Generic.lift: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Generic Lines 83-89 of bend-collections-laws-math@1.0.0.0/spec/math/generic.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/generic.bend&start_line=83&end_line=89 import Base import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as M # a Nat result carried to T (values that are no larger than an argument) def lift(~T: Data, ~of: Nat -> T, r: Result<&2, &2, M.MathError, Nat>) -> Result<&2, &2, N.NumError, T>: match r: case Done{x}: Done{of(x)} case Fail{e}: Fail{err(e)} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/generic.bend&name=err https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/natural.bend&name=MathError https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/num.bend&name=NumError