def sug.keep.rest

shake@0.7.0.0 · src/cli.bend:2340

import shake@0.7.0.0/src/cli.bend as Cli
import Base

2340# a close candidate against the closest one after it: the earlier on a tie
2341def sug.keep.rest(+typed: String, +cc: String, rest: Maybe<&2, String>) -> Maybe<&2, String>:
2342  match rest:
2343    case None{}:
2344      Some{cc}
2345    case Some{+ww}:
2346      Bool.pick(Maybe<&2, String>, Nat.is_le(osa(typed, cc), osa(typed, ww)), Some{cc}, Some{ww})

Uses (5)

Used by (1)