def close.last

bend-kit-hairpin@0.13.0.1 · hairpin.bend:343

import bend-kit-hairpin@0.13.0.1/hairpin.bend as Hairpin
import Base

343def close.last(~R: Type, ~close: R -> IO(Unit), last: Maybe<&1, Result<&1, &1, Err, R>>) -> IO(Unit):
344  match last:
345    case None{}:
346      IO.pure(Unit, Unit{})
347    case Some{r}:
348      match r:
349        case Fail{e}:
350          IO.pure(Unit, Unit{})
351        case Done{x}:
352          close(x)

Uses (6)

Used by (1)