Bind
Deprecated
Bind is redundant and will be removed in Arrow 2.x.x in favor of the DSL. In case you think this method should stay, please provide feedback and your use-case on https://github.com/arrow-kt/arrow/issues
Replace with
import arrow.fx.coroutines.resource
Content copied to clipboard
resource { f(source.bind()) }Content copied to clipboard
Constructors
Functions
Link copied to clipboard
Deconstruct Resource into an A and a release handler. The release action must always be called, if never called, then the resource A will leak. The release step is already made NonCancellable to guarantee correct invocation like Resource or bracketCase, and it will automatically rethrow, and compose, the exceptions as needed.
Link copied to clipboard
inline fun <B, C, D, E> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, crossinline map: (B, B, C, D) -> E): Resource<E>
inline fun <B, C, D, E, G> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, crossinline map: (B, B, C, D, E) -> G): Resource<G>
inline fun <B, C, D, E, F, G, H> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, f: Resource<F>, crossinline map: (B, B, C, D, E, F) -> G): Resource<G>
inline fun <B, C, D, E, F, G, H> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, f: Resource<F>, g: Resource<G>, crossinline map: (B, B, C, D, E, F, G) -> H): Resource<H>
inline fun <B, C, D, E, F, G, H, I> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, f: Resource<F>, g: Resource<G>, h: Resource<H>, crossinline map: (B, B, C, D, E, F, G, H) -> I): Resource<I>
inline fun <B, C, D, E, F, G, H, I, J> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, f: Resource<F>, g: Resource<G>, h: Resource<H>, i: Resource<I>, crossinline map: (B, B, C, D, E, F, G, H, I) -> J): Resource<J>
inline fun <B, C, D, E, F, G, H, I, J, K> zip(b: Resource<B>, c: Resource<C>, d: Resource<D>, e: Resource<E>, f: Resource<F>, g: Resource<G>, h: Resource<H>, i: Resource<I>, j: Resource<J>, crossinline map: (B, B, C, D, E, F, G, H, I, J) -> K): Resource<K>
Properties
Extensions
Link copied to clipboard
Composes a releaseCase action to a Resource.use action creating a Resource.