def CrError.lift
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cryptoimport 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}