rstudio / promises

A promise library for R
https://rstudio.github.io/promises
Other
201 stars 19 forks source link

Monad operator and visible argument don't get along #1

Closed jcheng5 closed 7 years ago

jcheng5 commented 7 years ago
library(promise)
library(monads)
resolved(cars) %>>% head() %>>% print()

This prints one row instead of 6. I believe this is because then's onFulfilled argument can optionally take a second argument visible, and this is being treated as the second argument to head() (and to print() for that matter). Probably the %>>% interface should only pass along the first argument.

jcheng5 commented 7 years ago

Long since fixed