Description Usage Arguments Examples
functions to construct and coerce lazy stream
1 2 3 4 5 | llist(...)
llist_lazy(...)
as.llist(x)
|
... |
non lazy-stream object, |
x |
any type of object |
1 2 3 4 5 6 7 8 9 10 11 12 | x <- llist(1, 2, 3) # arguments are evaluated
# y <- llist(1, repeat() {}, 3) # cannot return
z <- llist_lazy(1, repeat{}, 3) # can be defined
lhead(z) # => 1
# Convert R's vector (include R's list) to llist
# is.llist(as.llist(x)) is ALWAYS TRUE
as.llist(1:3) # => llist(1,2,3)
llist(1, list(2, 3))
# => llist(1, list(2,3))
# => only the first layer is converted
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.