def Ty.list.of
bend-kube-runtime@0.2.0.0 · src/typed.bend:124
import bend-kube-runtime@0.2.0.0/src/typed.bend as Typed
import Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
124def Ty.list.of(~A: Data, ~dec: J.Json -> String -> Result<&2, &2, String, A>, j: J.Json,
125 +path: String) -> Result<&2, &2, String, List<&2, A>>:
126 match j:
127 case J.JNull{}:
128 Done{Nil{}}
129 case J.JArr{xs}:
130 Ty.list.go(~A, ~dec, J.Json.chain(xs), path, 0)
131 case _:
132 Fail{path ++ ": expected a list"}