6 ms·
For those that are interested, I gathered in a gist some functional combinators I have been writing over the years. As a personal name convention, I use '|' (t
by 77544cec 7y ago
For those that are interested, I gathered in a gist some functional combinators I have been writing over the years.
As a personal name convention, I use '|' (the piping character) as a suffix to name any function returning a function, which includes function combinators. Thus the naming of these functions becomes straighforward: 'every-pred' becomes 'and|' while 'some-fn' turns into 'or|'.
Example:
(filter (and| pos? even?) nums)
(filter (or| neg? odd?) nums)
More: https://gist.github.com/TristeFigure/acd689f3c57e840ebb9f8a65a2052e49 https://gist.github.com/TristeFigure/acd689f3c57e840ebb9f8a6...
- dimovich 7y agoThank you for sharing this! Another useful library with "missing" functions is Medley[0] by James Reeves. [0] https://github.com/weavejester/medley https://github.com/weavejester/medley