Module
Run.Streaming.Prelude
- Package
- purescript-run-streaming
- Repository
- natefaubion/purescript-run-streaming
#cat Source
cat :: forall a x r. Run (Transformer x x r) aForwards incoming values downstream.
#map Source
map :: forall a o i r. (i -> o) -> Run (Transformer i o r) aAdapts incoming values.
#filter Source
filter :: forall a x r. (x -> Boolean) -> Run (Transformer x x r) aFilters incoming values based on a predicate.
#concat Source
concat :: forall a f x r. Foldable f => Run (Transformer (f x) x r) aForwards all individual values in an incoming Foldable downstream.
#concatMap Source
concatMap :: forall a f o i r. Foldable f => (i -> f o) -> Run (Transformer i o r) aComposition of map followed by concat.
#take Source
take :: forall x r. Int -> Run (Transformer x x r) UnitTakes a specified number of values from the head of the stream, terminating upon completion.
#takeWhile Source
takeWhile :: forall x r. (x -> Boolean) -> Run (Transformer x x r) UnitTakes values from the head of the stream as determined by the provided predicate. Terminates when the predicate fails.
#drop Source
drop :: forall a x r. Int -> Run (Transformer x x r) aDrops a specified number of values from the head of the stream.
#dropWhile Source
dropWhile :: forall a x r. (x -> Boolean) -> Run (Transformer x x r) aDrops values from the head of the stream as determined by the provided predicate. Forwards all subsequent values.
#scan Source
scan :: forall a x o i r. (x -> i -> x) -> x -> (x -> o) -> Run (Transformer i o r) aFolds over the input, yielding each step.
Re-exports from Run.Streaming
#Transformer Source
type Transformer i o r = (await :: AWAIT i, yield :: YIELD o | r)Transformers await values i and yield values o using effects r.