A shorter version of ZPipeline.identity, which can facilitate more compact definition of pipelines.
A shorter version of ZPipeline.identity, which can facilitate more compact definition of pipelines.
ZPipeline[Int].filter(_ % 2 != 0)
Creates a pipeline that collects elements with the specified partial function.
Creates a pipeline that collects elements with the specified partial function.
ZPipeline.collect[Option[Int], Int] { case Some(v) => v }
Creates a transducer that always dies with the specified exception.
Creates a transducer that always dies with the specified exception.
ZPipeline.die(new IllegalStateException)
Creates a pipeline that drops elements until the specified predicate evaluates to true.
Creates a pipeline that drops elements until the specified predicate evaluates to true.
ZPipeline.dropUntil[Int](_ > 100)
Creates a pipeline that drops elements while the specified predicate evaluates to true.
Creates a pipeline that drops elements while the specified predicate evaluates to true.
ZPipeline.dropWhile[Int](_ <= 100)
Creates a pipeline that always fails with the specified value.
Creates a transducer that always dies with the specified exception.
Creates a pipeline that filters elements according to the specified predicate.
A stateful fold that will emit the state and reset to the starting state every time the specified predicate returns false.
Creates a pipeline from the provided fold function, which operates on the state and the elements of the source stream.
Creates a pipeline from the provided fold function, which operates on the state and the elements of the source stream.
val counter = ZPipeline.foldLeft(0)((count, _) => count + 1)
Creates a transducer by effectfully folding over a structure of type O
.
Creates a transducer by effectfully folding over a structure of type O
. The transducer will
fold the inputs until the stream ends, resulting in a stream with one element.
Creates a transducer that folds elements of type I
into a structure
of type O
until max
elements have been folded.
Creates a transducer that folds elements of type I
into a structure
of type O
until max
elements have been folded.
Like foldWeighted, but with a constant cost function of 1.
Creates a transducer that effectfully folds elements of type I
into a structure
of type O
until max
elements have been folded.
Creates a transducer that effectfully folds elements of type I
into a structure
of type O
until max
elements have been folded.
Like foldWeightedM, but with a constant cost function of 1.
A stateful fold that will emit the state and reset to the starting state every time the specified predicate returns false.
Creates a pipeline that effectfully maps elements to the specified effectfully-computed value.
The identity pipeline, which does not modify streams in any way.
Creates a pipeline that maps elements with the specified function.
Creates a pipeline that maps elements with the specified effectful function.
Creates a pipeline that always succeeds with the specified value.
Creates a pipeline that takes elements until the specified predicate evaluates to true.
Creates a pipeline that takes elements while the specified predicate evaluates to true.
Creates a transducer by effectfully folding over a structure of type O
.
Creates a transducer by effectfully folding over a structure of type O
. The transducer will
fold the inputs until the stream ends, resulting in a stream with one element.
(Since version 2.0.0) use foldLeftZIO
A stateful fold that will emit the state and reset to the starting state every time the specified predicate returns false.
A stateful fold that will emit the state and reset to the starting state every time the specified predicate returns false.
(Since version 2.0.0) use foldZIO
Creates a transducer that effectfully folds elements of type I
into a structure
of type O
until max
elements have been folded.
Creates a transducer that effectfully folds elements of type I
into a structure
of type O
until max
elements have been folded.
Like foldWeightedM, but with a constant cost function of 1.
(Since version 2.0.0) use foldUntilZIO
Creates a pipeline that effectfully maps elements to the specified effectfully-computed value.
Creates a pipeline that effectfully maps elements to the specified effectfully-computed value.
(Since version 2.0.0) use fromZIO
Creates a transducer that always dies with the specified exception.
Creates a transducer that always dies with the specified exception.
(Since version 2.0.0) use failCause
Creates a pipeline that maps elements with the specified effectful function.
Creates a pipeline that maps elements with the specified effectful function.
(Since version 2.0.0) use mapZIO