Skip to content

Instantly share code, notes, and snippets.

@kmtr
Last active May 9, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmtr/7b91412a5dd4fda5aef7e1b6bd0abecd to your computer and use it in GitHub Desktop.
Save kmtr/7b91412a5dd4fda5aef7e1b6bd0abecd to your computer and use it in GitHub Desktop.
OCamlでも愛が生まれた ref: http://qiita.com/kmtr/items/7f82c2ed839db6ac3e84
open UCoreLib;;
let love =
let sei = UChar.int_of (Text.get (Text.of_string "生") 0) in
let si = UChar.int_of (Text.get (Text.of_string "死") 0) in
let ai = Text.to_string (Text.of_uchar (UChar.of_int (sei land si))) in
ai
;;
print_string love;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment