Mode:
Duration:
1
2
let add a b = a + b
let () = Printf.printf "%d\n" (add 10 20)Coding works best on desktop or with an external keyboard.
let add a b = a + b
let () = Printf.printf "%d\n" (add 10 20)Coding works best on desktop or with an external keyboard.
Adds two numbers and prints the result.
let add a b = a + b
let () = Printf.printf "%d\n" (add 10 20)OCaml is a functional, imperative, and object-oriented programming language in the ML family. It features strong static typing, type inference, and a powerful module system, making it suitable for compiler construction, systems programming, and formal verification.
Origin & Creator
Developed in 1996 by Xavier Leroy and the INRIA team in France as an extension of the Caml language.
Industrial Note
OCaml is widely used in formal methods, theorem provers (e.g., Coq), and financial software requiring high reliability.