OCaml Tutorial | Conditional Statements @martini:~$ vim conditional.ml @martini:~$ ocaml conditional.ml if (5>3) then print_int 5 else print_int 3;; if (3==1) then 1 else if (3==2) then 2 else 3;; true, false then과 else가 꼭 있어야 함 return type을 통일해줘야 하나? Computer Science/프로그래밍언어 2022.03.08
OCaml Tutorial | Primitives and Expressions TryOCaml (ocamlpro.com) Try OCaml try.ocamlpro.com print hello world 하는 법은? print_string "hello world";; @martini:~$ vim primitives.ml @martini:~$ ocaml primitives.ml print_int (5+5);; @martini:~$ vim primitives_int.ml @martini:~$ ocaml primitives_int.ml Computer Science/프로그래밍언어 2022.03.08