rmonad
rmonad copied to clipboard
Pipelines you can compute on
A long chain of functions, such as: ``` R u >% u %>>% u %>>% u %>>% u %>>% u %>>% u %>>% u %>>% u %>>% u %>>% u...
Very long chains of operations hit the C stack limit and crash. For example: ``` R u >% u %>>% u %>>% u %>>% u %>>% u %>>% u %>>%...
In `magrittr` you can do this: ```R "a" %>% paste("b", .) ``` But this breaks in `rmonad`: ```R "a" %>>% paste("b", .) ``` While this does work: ```R "a" %>>%...
These all record the same history: ```R foo >% sqrt } bar >% sqrt %>>% sqrt %>>% bar 16 %>>% sqrt %>>% bar 4 %>>% bar ``` This, for example,...
In the expression ``` > "a" %__% "b" %__% "c" %>% get_value() [[1]] [1] "a" [[2]] [1] "c" ``` The second node in the chain is missing. For longer chains,...
How should `rmonad` handle mutable data? For example, if an environment is stored in `rmonad`, say as the head node in an `Rmonad` object, and then the environment is altered...
In the pipeline: ```R "a" %v>% paste("b") %>% funnel("c" %v>% paste("d")) %*>% paste %>% plot(label='value') ``` `funnel` creates an extra node whose purpose seems only to merge the inputs to...
Given the pipeline: ```R "a" %v>% paste("b") %>% funnel("c" %v>% paste("d")) %*>% paste %>% plot(label='value') ``` I can easily cache the nodes wrapping `"a"`, `"c"`, and `"a b c d"`....
Binding a nested Rmonad into a funnel loses the nested nodes: ``` R 1 %>>% { . %>>% { . + 2 }} %>>% funnel(44) %>% size #R> 4 ```...
In ``` R 4 %>_% { . %>>% sqrt } ``` There should be a `transitive` edge between `4` and `.`, but there isn't. Contrast the plot of the above...