def scored
import cli@0.2.0.0/cli.bend as Cliimport Base
5730def scored(names: List<&2, String>, +typed: String, +limit: Nat) ->
5731 List<&2, Scored>:
5732 match names:
5733 case Nil{}: Nil{}
5734 case +name <> tail:
5735 +dist = osa(typed, String.take(name, 64n))
5736 +rest = scored(tail, typed, limit)
5737 Bool.pick(List<&2, Scored>, Nat.is_le(dist, limit),
5738 Scored{dist, name} <> rest, rest)