diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-03-28 22:24:45 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-03-28 22:24:45 -0700 |
commit | 128e59c15912c1a598616bf7c091043f95b6984c (patch) | |
tree | 5b2b6d426960364e95fcb37672c1d85afe179a88 /stdlib | |
parent | 09881b5025ef797821d9c6f238b332318795fd0c (diff) | |
download | txr-128e59c15912c1a598616bf7c091043f95b6984c.tar.gz txr-128e59c15912c1a598616bf7c091043f95b6984c.tar.bz2 txr-128e59c15912c1a598616bf7c091043f95b6984c.zip |
New function keep: generalized keepqual.
* eval.c (eval_init): Register keep intrinsic.
* lib.[ch] (keep): New function.
* stdlib/compiler.tl (compiler comp-fun-form): Transform
two argument keep to keepqual.
* txr.1: Documented.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/compiler.tl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stdlib/compiler.tl b/stdlib/compiler.tl index 836d53cd..98232c7b 100644 --- a/stdlib/compiler.tl +++ b/stdlib/compiler.tl @@ -1407,6 +1407,7 @@ ((pos @obj @seq) (set form (rlcp ^(posqual ,obj ,seq) form))) ((member @obj @seq) (set form (rlcp ^(memqual ,obj ,seq) form))) ((subst @obj @seq) (set form (rlcp ^(subqual ,obj ,seq) form))) + ((keep @obj @seq) (set form (rlcp ^(keepqual ,obj ,seq) form))) (@(require (chain . @nil) (> olev 5) (can-inline-chain form)) |