News for hackers. Stuff that matters.
Re:Functional programming is not popular because it is weird... by grapist420 on Tuesday September 14, 2021 @02:08AM (#28520874)
that same logic works for reversed-compose - a|b|c|d = (a)|(b~c~d). It is inconsistent with the normal kind but I think it’s worth it just for the ability to write list |map| func |filter| predicate |group-by| keyfunc |map| .values() |map| sum, which is so nice because you start with the value and as you read the thing that’s happening is precisely the thing you’re reading, and everything’s in one place - it’s
Re:Functional programming is not popular because it is weird... by fiddlerwoaroof on Tuesday September 14, 2021 @02:28AM (#28521025)
This is only true if your stages don't have arguments: with a | b(something) | c | d, `something` is now evaluated before b(something)
Re:Functional programming is not popular because it is weird... by grapist420 on Tuesday September 14, 2021 @02:31AM (#28521052)
true, although argument evaluation order in a(x,b(y,c(d),z),w) is already somewhat hard to rely on