Hacker News new | ask | show | jobs
by oinksoft 3824 days ago
Are list comprehensions still part of ES7? It's strange that Babel removed the list comprehension transformer recently, but I haven't been following closely.

The Elixir pipe syntax is reminiscent of Clojure's ->/->>:

  (->> (range 1 10)
       (map #(* % %))
       (filter (partial > 40)))
It's nice that in languages like Haskell or ML this is trivial:

  infix |> 
  fun (a |> b) = a b
You could modify this to let NONE fall through, etc.
2 comments

Wouldn't it be "fun (a |> b) = b a"? (call b on result of argument a)?
Oops, that's right.
Last time I checked no, but it's been supported in FF for quite some time now.