fun icon indicating copy to clipboard operation
fun copied to clipboard

Nested `partial` in combination with `compose` has a scoping bug

Open klmr opened this issue 4 years ago • 0 comments

MWE:

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 = "") : could not find function "p"

Note that neither partial + compose nor nested partial in isolation reproduce the bug trivially; both need to be combined.

klmr avatar May 18 '21 13:05 klmr