3 ms·
In Unix: a; b # Execute command b after a. The result of a is not used by b. In Haskell: a >> b # Run function b after a. The result of a is not
by CalmStorm 6y ago
In Unix:
a; b # Execute command b after a. The result of a is not used by b.
In Haskell:
a >> b # Run function b after a. The result of a is not used by b.
In Unix:
a | b # Execute command b after a. The result of a is used by b.
In Haskell:
a >>= b # Run function b after a. The result of a is used by b.
- cnity 6y agoNitpick, sort of, but in unix, a | b executes a and b in parallel, not sequentially. This somewhat complicates the analogy with programming. They're more like functions operating on a data stream. Edit: I might be misinterpreting your use of "execute _after_". You may not mean "after the completion of a" but instead "operating on the results of a, asynchronously" in which case, apologies.