DEV Community

loading...

Discussion on: F# is Pretty Cool

Collapse
deciduously profile image
Ben Lovy Author • Edited

I did learn OCaml before I learned F# - and strongly prefer the latter. Thanks for the tip, though!

I agree, JS interop via BuckleScript is really nice, but everything else was harder to use than the equivalent in F#

Collapse
lyfolos profile image
Muhammed H. Alkan

Ah, I just remembered it now. There is OCaml preprocessor or macro language named camlp. That makes you easier to code OCaml, makes you have more features like F# have. For example for each loop

let a_list = ["hello"; "world"] in
for s in a_list do
  print_endline s
done