# NOT RUN {
set.seed(42)
m <- as_monad(runif(1e6), tag="a") %>>%
sqrt %>% tag("b") %>>%
log %>% tag("c") %>>% prod(2) %>>% prod(3)
m1 <- crunch(m)
get_value(m, 1:3) %>% lapply(head)
get_value(m1, 1:3) %>% lapply(head)
# }
Run the code above in your browser using DataLab