3 ms·
None of your steps are changing state. They are essentially functional in terms of composition. The sibling commenter had a better example of a tokenizer which
by crimsonalucard 7y ago
None of your steps are changing state. They are essentially functional in terms of composition.
The sibling commenter had a better example of a tokenizer which changes it's own state on every input.
- yellowapple 7y agoThe changing of internal state is not what defines "flow programming". The actual flow of data between concurrently-running processing steps is what defines "flow programming". But okay, here's a step with changing state: step4 = { previous = [read digit from stdin] while [read digit from stdin] { out = previous * digit previous = digit write out to stdout } } steps = step1 | step2 | step3 | step4