diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-25 00:42:19 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-25 00:42:19 -0800 |
commit | 894aec019d3ce82f861a5777236ac079c2f2388d (patch) | |
tree | a4e4414899200f6d66e88fa77e1cbffd5ffba804 /txr.1 | |
parent | 1c8251aae0294881d0dc9fcdffeb2f86040ee24e (diff) | |
download | txr-894aec019d3ce82f861a5777236ac079c2f2388d.tar.gz txr-894aec019d3ce82f861a5777236ac079c2f2388d.tar.bz2 txr-894aec019d3ce82f861a5777236ac079c2f2388d.zip |
* eval.c (eval_init): New function interned.
* lib.c:x (lazy_flatten_scan, lazy_flatten_func): New static functions.
(lazy_flatten): New function.
* lib.h (lazy_flatten): Declared.
* match.c (v_next): Use lazy_flatten instead of flatten for
processing a :list source. This means that @(next :list ...)
can be used to process infinite lazy lists.
* txr.1: Documented lazy-flatten.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -5606,7 +5606,7 @@ Examples: (ldiff a b)) -> (1) -.SS Function flatten +.SS Functions flatten, lazy-flatten .TP Syntax: @@ -5617,7 +5617,11 @@ Syntax: Description: The flatten function produces a list whose elements are all of the non-nil -atoms contained in the structure of <list>. +atoms contained in the structure of <list>. The lazy-flatten function +works like flatten except that flatten creates and returns a complete +flattened list, whereas lazy-flatten produces a lazy list which is +instantiated on demand. This is particularly useful when the input +structure is itself lazy. .TP Examples: |