def least.vs
import ezx@1.11.0.0/src/pub/blurb.bend as Blurbimport 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})