News for hackers. Stuff that matters.
Re:F# enters Tiobe top 20 index for the first time by technomancy on Monday August 08, 2011 @12:16PM (#2860556)
Curious: is this also valid ocaml?
Re:F# enters Tiobe top 20 index for the first time by aplusbi on Monday August 08, 2011 @01:23PM (#2860791)
Almost, |> isn't an operator in OCaml (although I think Batteries has something like |- that does the same thing) and printfn isn't in OCaml. Printf.printf is, but wouldn't work in this case (you'd need a format string). Also, List.map returns a new list, in OCaml you would probably want to do List.iter.
Re:F# enters Tiobe top 20 index for the first time by hamidpalo on Monday August 08, 2011 @01:43PM (#2860870)
the |> operator is very very simple. ocaml implementation would look something like:

  let (|>) a b = b a ;;