3 ms·
What is "pipe"? Surely you're not referring to the bitwise-or operator `|`?
by recursive 4y ago
What is "pipe"? Surely you're not referring to the bitwise-or operator `|`?
- dvlsg 4y agoRamda has a composition (left to right) function named pipe: https://ramdajs.com/docs/#pipe https://ramdajs.com/docs/#pipe It's similar to the pipe operator seen in other languages (Elixir, F#, etc). There is a proposal to add a pipe operator to JS as well - still in early stages, though.
- Rumudiez 4y agoIt’s for connecting functions together like a pipeline, the same as compose but the fn list is reversed. Lodash has something similar called chain, but that’s harder to extend and isn’t as portable as partially applied functions