From 35bcaaa67efbe9b60e69b0f7c17acc186c74e7c3 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 1 Jun 2021 14:11:55 +0530 Subject: In pipe, pass through input keys to all expressions. Earlier, the input keys would only be passed to the first expression. The second expression would only receive the output keys from the first expression. Passing input keys through to all expressions is a common use case, since expressions often need to access global inputs. If the original behavior is desired, we can always introduce a new construct, say `pipe-strict'. * ccwl/ccwl.scm (workflow-steps): In pipe, pass through input keys to all expressions. --- ccwl/ccwl.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ccwl/ccwl.scm b/ccwl/ccwl.scm index 0848c45..1f864e1 100644 --- a/ccwl/ccwl.scm +++ b/ccwl/ccwl.scm @@ -310,8 +310,9 @@ list of supplied input objects." ;; pipe ((pipe expressions ...) (foldn (lambda (expression input-keys steps) - (let ((input-keys child-steps (workflow-steps expression input-keys))) - (values input-keys (append steps child-steps)))) + (let ((child-output-keys child-steps (workflow-steps expression input-keys))) + (values (append input-keys child-output-keys) + (append steps child-steps)))) #'(expressions ...) input-keys (list))) -- cgit v1.2.3