def lcm_go

bend-collections-laws-math@1.0.0.0 · spec/math/generic.bend:130

import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Generic
import Base
import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as M

130def lcm_go(+w: Nat, xs: List<&2, Nat>, +acc: Nat, ok: Bool) -> Nat & Bool:
131  match xs ok:
132    case Nil{} _:
133      (acc, ok)
134    case Con{x, t} False{}:
135      (acc, False{})
136    case Con{+x, t} True{}:
137      lcm_go(w, t, M.lcm(acc, x), fits(w, M.lcm(acc, x)))

Uses (7)

Used by (5)