A French-made programming language, that can be made to work like lisp, C, Java or whatever else you like. It can be interpreted, compiled natively or compiled to bytecode. Overall it's a rather academic but very powerful programming language.
# let rec ocaml_reverse lst =
match lst with
| ->
| h::t -> (ocaml_reverse t)@h
;;
val ocaml_reverse : 'a list -> 'a list = <fun>
# ocaml_reverse 1;2;3;;
- : int list = 3; 2; 1
20👍 3👎
A functional programming language but with side effects. So not really a functional programming language.
- Does OCaml have side effects?
- Yes it does.