def close.last

bend-kit-hairpin@0.14.0.0 · hairpin.bend:332

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

332def close.last(~R: Type, ~close: R -> IO(Unit), last: Maybe<&1, Result<&1, &1, Err, R>>) -> IO(Unit):
333  match last:
334    case None{}:
335      IO.pure(Unit, Unit{})
336    case Some{r}:
337      match r:
338        case Fail{e}:
339          IO.pure(Unit, Unit{})
340        case Done{x}:
341          close(x)

Uses (6)

Used by (1)