def CrError.lift

bend-osdev-crypto@0.1.0.0 · crypto.bend:50

import bend-osdev-crypto@0.1.0.0/crypto.bend as Crypto
import Base

50# A result with an algorithm's own error type, its error mapped onto CrError
51def CrError.lift(~E: Data, ~A: Data, ~f: E -> CrError, r: Result<&2, &2, E, A>) -> Result<&2, &2, CrError, A>:
52  match r:
53    case Fail{e}:
54      Fail{f(e)}
55    case Done{x}:
56      Done{x}

Uses (2)

Used by (4)