summaryrefslogtreecommitdiffstats
path: root/tests/012
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-08 07:53:43 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-08 07:53:43 -0700
commit3c0c679b74016f0219c31d82578b99e53e531c78 (patch)
tree36790f5703b5100a890056b91f4216ce501ac123 /tests/012
parentca9ecd3ded67f06c9cebe5b3fd4d6fb940342f44 (diff)
downloadtxr-3c0c679b74016f0219c31d82578b99e53e531c78.tar.gz
txr-3c0c679b74016f0219c31d82578b99e53e531c78.tar.bz2
txr-3c0c679b74016f0219c31d82578b99e53e531c78.zip
new: left-inserting pipeline operators.
* stdlib/op.tl (opip-expand): Take arguments which specify the op and do operators to be inserted. Pass these through the recursive calls. (opip, oand): Pass op and do for the new arguments. (lopip, loand): New macros like opip and oand, but passing lop and ldo to the expander. (lflow): New macro. * autoload.c (op_set_entries): Add autoload entries for lopip, loand and lflow. * tests/012/op.tl: A few new tests. * txr.1: Documented. * stdlib/doc-syms.tl: Regenerated.
Diffstat (limited to 'tests/012')
-rw-r--r--tests/012/op.tl4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/012/op.tl b/tests/012/op.tl
index 5501cec4..4e0a8d46 100644
--- a/tests/012/op.tl
+++ b/tests/012/op.tl
@@ -105,3 +105,7 @@
(flow 10 (+ 1) (let (x @1) (y (* x 2))) (+ x y)) 44
(flow 10 (+ 1) (let ((x @1) (y (* @1 2))) (+ x y))) 33
(flow 10 (+ 1) (let ((x @1) (y (* @1 2))))) nil)
+
+(mtest
+ (lflow 10 (- 1) (- 1)) 8
+ (lflow 10 (op - 100) (+ 1)) 91)