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