Alias for flatMap(_ => p2)
.
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.
Applies the resource of this pull to f
and returns the result.
If this
terminates with Pull.raiseError(e)
, invoke h(e)
.
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
.
Run p2
after this
, regardless of errors during this
, then reraise any errors encountered during this
.
Run p2
after this
, regardless of errors during this
, then reraise any errors encountered during this
.
Run p2
after this
, regardless of errors during this
, then reraise any errors encountered during this
.
Tracks any resources acquired during this pull and releases them when the pull completes.
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 effect type.
Lifts this pull to the specified effect type.
(pull: Pull[Nothing, O, R]).covary
Lifts this pull to the specified effect type, output type, and resource type.
Lifts this pull to the specified effect type, output type, and resource type.
(pull: Pull[Nothing, O, R]).covaryAll
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)
Tracks any resources acquired during this pull and releases them when the pull completes.
Tracks any resources acquired during this pull and releases them when the pull completes.
(pull: Pull[Nothing, O, R]).scope
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
.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)