Class Bracket<A,B>
java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn3.Bracket<A,B>
- Type Parameters:
A
- the initial value to map and clean upB
- the resulting type
- All Implemented Interfaces:
Fn1<IO<A>,
,Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>> Fn2<IO<A>,
,Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>> Fn3<IO<A>,
,Fn1<? super A, ? extends IO<?>>, Fn1<? super A, ? extends IO<B>>, IO<B>> Applicative<Fn1<Fn1<? super A,
,? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>> Cartesian<IO<A>,
,Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<?, ?>> Cocartesian<IO<A>,
,Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<?, ?>> Contravariant<IO<A>,
,Profunctor<?, Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<?, ?>>> Functor<Fn1<Fn1<? super A,
,? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>> Profunctor<IO<A>,
,Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<?, ?>> Monad<Fn1<Fn1<? super A,
,? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>> MonadReader<IO<A>,
,Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>> MonadRec<Fn1<Fn1<? super A,
,? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>> MonadWriter<IO<A>,
Fn1<Fn1<? super A, ? extends IO<?>>, Fn1<Fn1<? super A, ? extends IO<B>>, IO<B>>>, Fn1<IO<A>, ?>>
public final class Bracket<A,B>
extends Object
implements Fn3<IO<A>,Fn1<? super A,? extends IO<?>>,Fn1<? super A,? extends IO<B>>,IO<B>>
Given an
IO
that yields some type A
, a cleanup operation to run if a value of that type could be
provisioned, and a kleisli arrow from that type to a new IO
of type B
, produce an
IO
<B>
that, when run, will provision the A
,
flatMap
it to B
, and clean up the original value if it was produced in the
first place.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2
checkedApply, toBiFunction
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Bracket
private Bracket()
-
-
Method Details
-
checkedApply
-
bracket
-
bracket
-
bracket
-
bracket
-