mainに相当する関数
OCamlにはない。
代わりに,
let () = ...
とか
let _ = ...
とかするみたい。
let hello () = print_string "Hello world!\n"
let () = hello ()
^o^ >ocamlc -o hello.exe hello.ml
^o^ >hello
Hello world!
OCamlにはない。
代わりに,
let () = ...
とか
let _ = ...
とかするみたい。
let hello () = print_string "Hello world!\n"
let () = hello ()
^o^ >ocamlc -o hello.exe hello.ml
^o^ >hello
Hello world!