|
|
|
|
|
by tomgg
4286 days ago
|
|
I've been playing around with julia[1] this week and discovered the inclusion of a pipe-like operator that removes a lot of the parentheses from functional programming; you can write, x |> a|> b |> c|>s->d(s,y)|>e|>...
in julia instead of e(d(c(b(a(x))),y)) or (e (d (c (b (a x)) y))
...or whatever is your flavour. I reckon it is impossible to make a serious case against that readability gain.[1] julialang.org |
|
In many libraries there is also a reverse apply function defined, often as &
which is more popular when using other operator chains to describe functions as in lens.