4 ms·
In Haskell there's also dot (edit - my bad, not dot, pipe) syntax which allows composing functions left to right. I believe Nim also has it. Just as a few mor
by dismalaf 1y ago
In Haskell there's also dot (edit - my bad, not dot, pipe) syntax which allows composing functions left to right. I believe Nim also has it. Just as a few more examples.
- _kb 1y agoI don’t think that’s correct. The dot operator is composition with the same semantics as when using normal math notation. (f . g) x is equivalent to f (g x)
- deleted 1y ago[deleted]
- projektfu 1y agof . g is still doing g first, then f, right? Haskell has pipelines in the Flow library. https://hackage-content.haskell.org/package/flow-2.0.0.9/docs/Flow.html https://hackage-content.haskell.org/package/flow-2.0.0.9/doc...
- dismalaf 1y agoOoops my bad. Been too long.
- valcron1000 1y agoNo need to import a third party library: you can use `Data.Function ((&))` for this: arg & f1 & f2 & f3