diff options
author | Ian Johnson <ian.johnson@appliedlanguage.com> | 2012-10-15 17:15:15 +0400 |
---|---|---|
committer | Ian Johnson <ian.johnson@appliedlanguage.com> | 2012-10-15 17:15:15 +0400 |
commit | b9ebbb9455332ee5c5b024a3c9378081c62225d2 (patch) | |
tree | e0e332c70a281d98c8bbf8a3d517a4deadab48cd | |
parent | eb5df15c90e0b25c366bd2fd106b831860b9c50c (diff) | |
parent | c2916085c5ab3aa7f010d5ba966354bbaff05ce5 (diff) |
Merge branch 'master' of github.com:ianj-als/pypeline
Conflicts:
src/pypeline/helpers/helpers.py
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/pypeline/helpers/helpers.py | 5 |
2 files changed, 4 insertions, 5 deletions
@@ -168,10 +168,10 @@ Returns a pipeline component that is the composition of two components with a wi helpers.cons_composed_component(first_component, second_component) -Returns a components that is the composition of the `first_component` and the `second_component`. +Returns a component that is the composition of the `first_component` and the `second_component`. #### Constructing a Parallel Component helpers.cons_parallel_component(top_component, bottom_component) -Returns a component that will execute the two provided components in parallel. The input to the constructed component is a pair, whose first value is applied to the `top_component` and the second value is applied to the `bottom_component`. The constructed component`s output shall be a pair, whose first value is the output of the top component, and the second value is the output of the bottom component. +Returns a component that will execute the two provided components in "parallel". The input to the constructed component is a pair, whose first value is applied to the `top_component` and the second value is applied to the `bottom_component`. The constructed component`s output shall be a pair, whose first value is the output of the top component, and the second value is the output of the bottom component. diff --git a/src/pypeline/helpers/helpers.py b/src/pypeline/helpers/helpers.py index 9fe2ad6..69255b9 100644 --- a/src/pypeline/helpers/helpers.py +++ b/src/pypeline/helpers/helpers.py @@ -118,14 +118,13 @@ def cons_function_component(function, def bind_function(a): def state_function(s): - # Transform the value into a line, that when - # injected into stdin, the subprocess will understand + # Transform the input transformed_a = input_forming_function(a, s) if input_forming_function else a # Apply new_a = function(transformed_a, s) - # Parse the output from the subprocess + # Transform the output of the function transformed_new_a = output_forming_function(new_a, s) if output_forming_function else new_a # Mutate the state |