aboutsummaryrefslogtreecommitdiff
path: root/doc/identity-construct.scm
diff options
context:
space:
mode:
authorArun Isaac2023-12-01 22:34:03 +0000
committerArun Isaac2023-12-01 22:35:23 +0000
commit770b738fe62112fc16c5213bd5769a8a54074fc7 (patch)
treea704111e059737002c3c6a558ffc3449382e7fa0 /doc/identity-construct.scm
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 'doc/identity-construct.scm')
-rw-r--r--doc/identity-construct.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/identity-construct.scm b/doc/identity-construct.scm
new file mode 100644
index 0000000..626568f
--- /dev/null
+++ b/doc/identity-construct.scm
@@ -0,0 +1,14 @@
+(define print-message
+ (command #:inputs (message #:type string)
+ #:run "echo" message
+ #:outputs (printed-message #:type stdout)))
+
+(define print-file
+ (command #:inputs (file #:type File)
+ #:run "cat" file
+ #:outputs (printed-file #:type stdout)))
+
+(workflow ((message #:type string))
+ (pipe (print-message #:message message)
+ (tee (print-file #:file printed-message)
+ (identity))))