def find
import bolt@1.27.0.0/src/codes.bend as Codesimport Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
63# the row for a slug
64def find(rows: List<&2, Entry>, +slug: String) -> Maybe<&2, Entry>:
65 match rows:
66 case Nil{}:
67 None{}
68 case Con{+row, rest}:
69 Lazy.stop(Maybe<&2, Entry>, find.same(row, slug), Some{row}, _u => find(rest, slug))