diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-08-23 19:59:38 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-08-23 19:59:38 -0700 |
commit | d6e02ceea56644dea341e64a1f46f8fbe43ca6b5 (patch) | |
tree | de7345d67de93291489fae1f726e73991b057cf9 /tests/012/op.tl | |
parent | 33cd4b10aca2e097e1d03fe4d5ee725f4f207131 (diff) | |
download | txr-d6e02ceea56644dea341e64a1f46f8fbe43ca6b5.tar.gz txr-d6e02ceea56644dea341e64a1f46f8fbe43ca6b5.tar.bz2 txr-d6e02ceea56644dea341e64a1f46f8fbe43ca6b5.zip |
New macros opf and lopf.
These remove repetitive (op ...) syntax from
the arguments of functional combinators.
* stdlib/opt.tl (opf, lopf): New macros.
* autoload.c (op_set_entries): Register opf and
lopf as autoload triggers.
* tests/012/op.tl: New tests.
* txr.1: Documented.
Diffstat (limited to 'tests/012/op.tl')
-rw-r--r-- | tests/012/op.tl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/012/op.tl b/tests/012/op.tl index 4e0a8d46..1652b3c8 100644 --- a/tests/012/op.tl +++ b/tests/012/op.tl @@ -109,3 +109,7 @@ (mtest (lflow 10 (- 1) (- 1)) 8 (lflow 10 (op - 100) (+ 1)) 91) + +(mtest + (remove-if (opf orf (< 10) (> 5)) (range 0 20)) (5 6 7 8 9 10) + (remove-if (lopf orf (> 10) (< 5)) (range 0 20)) (5 6 7 8 9 10)) |