fun
fun copied to clipboard
Module for functional programming in R
MWE: ```r box::use(klmr/fun[..., p = partial]) strrev = p(strsplit, '') %|>% p(lapply, rev) %|>% p(lapply, p(paste, collapse = '')) %|>% unlist strrev(c('foo', 'bar')) # Error in p(paste, collapse = "")...
Needs investigation. The following two pieces of code should be equivalent but aren’t: ```r lambda = function (x) { mod::import('klmr/functional/lambda', '
Add `curry` and `uncurry` functions. I’m not sure they’re particularly useful to be honest but [given the confusion between currying and partial application in the R community](https://github.com/klmr/functional/blob/c495cc0de8c103deb88e76025a825fbdd09191f5/__init__.r#L46-L48) it would have...
- [ ] `closure` - [ ] `compose` - [ ] `->` - [ ] `isFALSE` - [ ] `%||%` - [x] `partial`