def item.obj

bend-toon-codec@0.1.0.0 · src/rep.bend:59

import bend-toon-codec@0.1.0.0/src/rep.bend as Rep
import Base

59# The first line of an object item rides on the hyphen line; the rest sit one
60# level under it.
61def item.obj(+ls: List<&2, Ln>) -> List<&2, Ln>:
62  match ls:
63    case Nil{}:
64      one(0, "-")
65    case Con{Ln{d, t}, rest}:
66      Con{Ln{0, "- " ++ t}, shift(rest)}

Uses (5)

Used by (1)