aboutsummaryrefslogtreecommitdiff
path: root/ccwl
diff options
context:
space:
mode:
authorArun Isaac2023-12-01 22:34:03 +0000
committerArun Isaac2023-12-01 22:35:23 +0000
commit770b738fe62112fc16c5213bd5769a8a54074fc7 (patch)
treea704111e059737002c3c6a558ffc3449382e7fa0 /ccwl
parented207cdbdace951595a18548b77bc38fb3f1c6ef (diff)
downloadccwl-770b738fe62112fc16c5213bd5769a8a54074fc7.tar.gz
ccwl-770b738fe62112fc16c5213bd5769a8a54074fc7.tar.lz
ccwl-770b738fe62112fc16c5213bd5769a8a54074fc7.zip
ccwl: Implement identity construct.
* ccwl/ccwl.scm (collect-steps): Implement identity construct. * doc/ccwl.skb (Cookbook)[The identity construct]: New section. * doc/identity-construct.scm: New file.
Diffstat (limited to 'ccwl')
-rw-r--r--ccwl/ccwl.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm
index d00609d..bbc5de1 100644
--- a/ccwl/ccwl.scm
+++ b/ccwl/ccwl.scm
@@ -625,7 +625,7 @@ supplied input keys."
output keys and a list of steps. INPUT-KEYS is a list of supplied
input keys. Keys are represented by <key> objects, and steps are
represented by <step> objects."
- (syntax-case x (pipe tee rename scatter scatter-cross scatter-nested-cross)
+ (syntax-case x (pipe tee identity rename scatter scatter-cross scatter-nested-cross)
;; pipe
((pipe expressions ...)
(foldn (lambda (expression input-keys steps)
@@ -638,6 +638,8 @@ represented by <step> objects."
((tee expressions ...)
(append-mapn (cut collect-steps <> input-keys)
#'(expressions ...)))
+ ((identity)
+ (values input-keys (list)))
;; rename keys (base case)
((rename new-key old-key)
(begin