summaryrefslogtreecommitdiffstats
path: root/tests/012
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-11-08 21:06:57 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-11-08 21:06:57 -0800
commit7215b52357ee6cff03ea6c52a2c58f4f21f05add (patch)
treec88be5cc7807a8afc8d11289aa3cf0f089bc5cc9 /tests/012
parentf6ce49bf236f58f6d9c84428c4081ebe2620a9c4 (diff)
downloadtxr-7215b52357ee6cff03ea6c52a2c58f4f21f05add.tar.gz
txr-7215b52357ee6cff03ea6c52a2c58f4f21f05add.tar.bz2
txr-7215b52357ee6cff03ea6c52a2c58f4f21f05add.zip
New macro: tap.
* autoload.c (op_set_entries): Add tap symbol as autoload trigger for op module. * stdlib/op.tl (tap): New macro. * tests/012/op.tl: New test. * txr.1: Documented.
Diffstat (limited to 'tests/012')
-rw-r--r--tests/012/op.tl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/012/op.tl b/tests/012/op.tl
index 1652b3c8..47f1f80d 100644
--- a/tests/012/op.tl
+++ b/tests/012/op.tl
@@ -113,3 +113,15 @@
(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))
+
+(test
+ (let ((x 0) (y 0))
+ (list (flow x
+ (+ 2)
+ (tap inc y @1)
+ (* 4)
+ (tap inc y @1)
+ (+ 5)
+ (tap inc y @1))
+ y))
+ (13 23))