resource<F, R, O> static method

Conveyor<F, O> resource<F, R, O>(
  1. F acquire,
  2. Conveyor<F, O> use(
    1. R r
    ),
  3. Conveyor<F, O> release(
    1. R r
    )
)

Implementation

static Conveyor<F, O> resource<F, R, O>(F acquire, Conveyor<F, O> use(R r), Conveyor<F, O> release(R r)) =>
    eval<F, R>(acquire).bind((r) => use(r).onComplete(() => release(r)));