def least.vs

ezx@1.11.0.0 · src/pub/blurb.bend:63

import ezx@1.11.0.0/src/pub/blurb.bend as Blurb
import Base
import ezx@1.11.0.0/src/pkg/pkg.bend as K

63# the earlier of the file found so far and the next one; a tie keeps the one
64# found first
65def least.vs(cur: Maybe<&2, K.Source>, +next: K.Source) -> Maybe<&2, K.Source>:
66  match cur:
67    case None{}:
68      Some{next}
69    case Some{+c}:
70      Bool.pick(Maybe<&2, K.Source>, String.is_le(at(c), at(next)), Some{c}, Some{next})

Uses (5)

Used by (1)