Using a function to signal group changes, apply a machine independently over each group.
Modulemachines-0.7.4Haskell2010
Data.Machine.Group
- 5 values
- Packagemachines-0.7.4
- Exports5
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceGroup.hs
Mark a transition point between two groups as a function of adjacent elements. Examples
runT $ supply [1,2,2] (taggedBy (==))[Right 1,Left (),Right 2,Right 2]
Run a machine multiple times over partitions of the input stream specified by Left () values.
Run a machine with no input until it stops, then behave as another machine.
Read inputs until a condition is met, then behave as cont with | input matching condition as first input of cont. | If await fails, stop.