5 ms·
OCaml has while- and for-loops. A better example might be Clojure, which has mutable variables (opt-in, like OCaml), but no traditional imperative loops - only
by int_19h 5y ago
OCaml has while- and for-loops.
A better example might be Clojure, which has mutable variables (opt-in, like OCaml), but no traditional imperative loops - only recursion. However, even then, the syntax for its tail-recursive construct uses "loop" as a keyword.