Run OCaml 5 online — algebraic types, effect handlers, no install.
OCaml is one of the most influential functional languages: strong type inference, algebraic data types, a serious module system, and — as of OCaml 5 — effect handlers and multicore. Popular in finance (Jane Street), academic research, and inside compilers (Flow, Reason).
ls-judge compiles OCaml 5 with the standard toolchain inside a Firecracker microVM.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
let () =
let n = int_of_string (input_line stdin) in
Printf.printf "%d\n" (n * 2)
21
42