Alias for _.map(_ => o2)
.
Returns a pull with the result wrapped in Right
, or an error wrapped in Left
if the pull has failed.
Lifts this pull to the specified output type.
Lifts this pull to the specified resource type.
Applies the resource of this pull to f
and returns the result in a new Pull
.
Interpret this Pull
to produce a Stream
.
Interpret this Pull
to produce a Stream
. The result type R
is discarded.
Alias for _.map(_ => o2)
.
Alias for _.map(_ => o2)
.
(pull: Pull[Nothing, O, R]).as(r2)
Returns a pull with the result wrapped in Right
, or an error wrapped in Left
if the pull has failed.
Returns a pull with the result wrapped in Right
, or an error wrapped in Left
if the pull has failed.
(pull: Pull[Nothing, O, R]).attempt
Lifts this pull to the specified output type.
Lifts this pull to the specified output type.
(pull: Pull[Nothing, O, R]).covaryOutput
Lifts this pull to the specified resource type.
Lifts this pull to the specified resource type.
(pull: Pull[Nothing, O, R]).covaryResource
Applies the resource of this pull to f
and returns the result in a new Pull
.
Applies the resource of this pull to f
and returns the result in a new Pull
.
(pull: Pull[Nothing, O, R]).map(f)
Interpret this Pull
to produce a Stream
.
Interpret this Pull
to produce a Stream
. The result type R
is discarded.
(pull: Pull[Nothing, O, R]).stream
A
p: Pull[F,O,R]
reads values from one or more streams, returns a result of typeR
, and produces aStream[F,O]
when callingp.stream
.Any resources acquired by
p
are freed following the call tostream
.Much of the API of
Pull
is defined in Pull.InvariantOps.Laws:
Pull
forms a monad inR
withpure
andflatMap
:pure >=> f == f
f >=> pure == f
(f >=> g) >=> h == f >=> (g >=> h)
wheref >=> g
is defined asa => a flatMap f flatMap g
fail
is caught byonError
:onError(fail(e))(f) == f(e)