Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- id :: forall up item action. PipePlus up action item item
- takeWhile :: forall item action up. (item -> Job up action Bool) -> PipePlus up action item item
- dropWhile :: forall item action up. (item -> Job up action Bool) -> PipePlus up action item item
- cons :: forall item action up. Job up action item -> PipePlus up action item item
- intersperse :: forall item action up. Job up action item -> PipePlus up action item item
- beforeEach :: forall item action up. Job up action item -> PipePlus up action item item
- map :: forall item1 item2 action up. (item1 -> Job up action item2) -> PipePlus up action item1 item2
- concat :: forall item action up. PipePlus up action [item] item
- concatMapJob :: forall item1 item2 action up. (item1 -> Job up action [item2]) -> PipePlus up action item1 item2
- concatMapProducer :: forall item1 item2 action. (item1 -> Producer action item2) -> Pipe action item1 item2
- group :: forall up item action. Eq item => PipePlus up action item (Positive, item)
Triviality
Predicates
:: forall item action up. (item -> Job up action Bool) | True if this is the sort of thing we'd like to keep |
-> PipePlus up action item item |
Yields the longest prefix matching the predicate and discards the rest
:: forall item action up. (item -> Job up action Bool) | True if this is the sort of thing we'd like to get rid of |
-> PipePlus up action item item |
Discards the longest prefix matching the predicate and yields the rest
Insertion
:: forall item action up. Job up action item | This job produces an item to add to the front of the list |
-> PipePlus up action item item |
Add one item to the beginning of a stream
:: forall item action up. Job up action item | This job generates items that will be inserted in between the items of the original list |
-> PipePlus up action item item |
Add an item between each pair of items of a stream
The length of the stream is modified as \case{ 0 -> 0; n -> (2 * n) - 1 }
.
:: forall item action up. Job up action item | This job generates items that will be inserted before each of the items of the original list |
-> PipePlus up action item item |
Add an item before each item in a stream
The length of the stream is doubled.
Mapping
:: forall item1 item2 action up. (item1 -> Job up action item2) | For each input item, this job produces an output item |
-> PipePlus up action item1 item2 |
Apply a function to each item in the stream
Concatenation
Concat + map
:: forall item1 item2 action up. (item1 -> Job up action [item2]) | For each input item, this job produces any number of output items |
-> PipePlus up action item1 item2 |
Applies the function to each result obtained from upstream, and yields each result from the list to the downstream
:: forall item1 item2 action. (item1 -> Producer action item2) | For each item from the input list, this vendor generates any number of actions to yield in the resulting list |
-> Pipe action item1 item2 |
Like concatMapJob
, but the function gives a Producer
instead of a Job