Description Usage Arguments Details Examples
Check if an object is lcons class.
1 2 3 4 5 6 7 | is.lpair(x)
is.lpair_not_llist(x)
is.llist(x)
is.llist_atomic_maybe(x, depth = 10)
|
x |
a lcons object |
depth |
for is.llist_atomic_maybe's |
lcons()
attach "lcons" class for output. is.lpair()
simply
checks this attribute.
is.llist(x)
returns TRUE
if x
is lempty
or
ltail(x)
is llist, or ltail(x)
and
ltail(ltail(x))
is the same expression in cdr part (promise part,
i.e., function body) for infinit-stream.
is.lpair_not_list(x) retuns TRUE if x
is lcons but not llist.
is.llist_atomic_maybe(x)
checks if lhead(x) is R's atomic object
for several loops. If the checking arrives its limit loop, this returns
structure(TRUE, class = "maybe")
. The default limit is ten.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | is.lpair(lempty) # => FALSE
is.lpair_not_llist(lempty) # => FALSE
is.llist(lempty) # => TRUE
is.lpair(1 %:% 2) # => TRUE
is.lpair_not_llist(1 %:% 2) # => TRUE
is.llist(1 %:% 2) # => FALSE
is.lpair(1 %..% 2) # => TRUE
is.lpair_not_llist(1 %..% 2) # => FALSE
is.llist(1 %..% 2) # => TRUE
ones <- 1 %:% ones
is.llist(ones) # => TRUE # circular reference
is.llist(1 %..% Inf) #=> TRUE #
is.llist_atomic_maybe(1 %..% 10) # => TRUE
is.llist_atomic_maybe(1 %..% 11) # => structure(TRUE, class = "maybe")
is.llist_atomic_maybe(1 %..% Inf) # => structure(TRUE, class = "maybe")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.