4 ms·
Though it's mostly a matter of taste, I find pipelines simpler and more natural than method calls. Compare: xs.filter(p).map(f) with filter p xs | ma
by xiaq 13y ago
Though it's mostly a matter of taste, I find pipelines simpler and more natural than method calls. Compare:
xs.filter(p).map(f)
with
filter p xs | map f
(Suppose filter and map are implemented such that they accept input either on the command line or from pipeline.)
- Tyr42 13y agoWell, lets try Haskell syntax map f $ filter p xs what, don't like the reverse order? That's fixable. If we define # as reverse function application, it's xs # filter p # map f or filter p xs # map f which is quite similar to what you are looking for.