def lcm_all_go
bend-collections-laws-crypto@1.0.0.0 · src/math/generic.bend:336
import bend-collections-laws-crypto@1.0.0.0/src/math/generic.bend as Generic
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/num.bend as N
336def lcm_all_go(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, xs: List<&2, T>, acc: Result<&2, &2, N.NumError, T>) -> Result<&2, &2, N.NumError, T>:
337 match xs acc:
338 case Nil{} _:
339 acc
340 case Con{x, rest} Fail{e}:
341 Fail{e}
342 case Con{+x, rest} Done{+a}:
343 lcm_all_go(~T, ~op, ~test, rest, lcm(~T, ~op, ~test, a, x))