def ents

ezx@1.11.0.0 · src/sha/dump.bend:93

import ezx@1.11.0.0/src/sha/dump.bend as Dump
import Base
import ezx@1.11.0.0/src/sha/nar.bend as Nar

93# every path of the listing, read
94def ents(+top: String, rs: List<&2, Nar.Row>) -> IO(List<&2, Nar.Ent>):
95  match rs:
96    case []:
97      IO.pure(List<&2, Nar.Ent>, [])
98    case +h <> t:
99      do IO<List<&2, Nar.Ent>>:
100        e : Nar.Ent <- ent.of(top, h)
101        rest : List<&2, Nar.Ent> <- ents(top, t)
102        return e <> rest

Uses (8)

Used by (1)