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 /match.c | |
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 'match.c')
-rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1974,7 +1974,7 @@ static val v_next(match_files_ctx *c) { cons_bind (new_bindings, success, match_files(mf_file_data(*c, lit("var"), - flatten(cdr(existing)), num(1)))); + lazy_flatten(cdr(existing)), num(1)))); if (success) return cons(new_bindings, |