def largest_of

mlbend-split@0.1.1.0 · main.bend:73

import mlbend-split@0.1.1.0/main.bend as MlbendSplit
import Base

73# The largest label of the labels.
74def largest_of(labels: List<&2, Nat>, +acc: Nat) -> Nat:
75  match labels:
76    case Nil{}:
77      acc
78    case Con{+h, t}:
79      largest_of(t, Bool.pick(Nat, Nat.is_gt(h, acc), h, acc))

Uses (4)

Used by (1)