def tree
import ezx@1.11.0.0/src/sha/nar.bend as Narimport Base
450# the node of the whole tree, or none for an empty listing
451def tree(es: List<&2, Ent>) -> Maybe<&2, String>:
452 match es:
453 case []:
454 None{}
455 case Ent{+kind, ex, name, at, body} <> t:
456 tree.top(String.eq(kind, "d"), Ent{kind, ex, name, at, body}, t)