def find

bolt@1.27.0.0 · src/codes.bend:63

import bolt@1.27.0.0/src/codes.bend as Codes
import 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))

Uses (6)

Used by (4)