Alias for flatMap(_ => p2)
.
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 effect type.
Lifts this pull to the specified effect type, output type, and resource type.
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.
If this
terminates with Pull.raiseError(e)
, invoke h(e)
.
Applies the resource of this pull to f
and returns the result in a new Pull
.
Applies the outputs of this pull to f
and returns the result in a new Pull
.
Run p2
after this
, regardless of errors during this
, then reraise any errors encountered during this
.
Interpret this Pull
to produce a Stream
.
Interpret this Pull
to produce a Stream
.
May only be called on pulls which return a Unit
result type. Use p.void.stream
to explicitly
ignore the result type of the pull.
Discards the result type of this pull.
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
.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
raiseError
is caught byhandleErrorWith
:handleErrorWith(raiseError(e))(f) == f(e)