def Ty.list.go
bend-kube-runtime@0.2.0.0 · src/typed.bend:113
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
113def Ty.list.go(~A: Data, ~dec: J.Json -> String -> Result<&2, &2, String, A>,
114 xs: List<&2, J.Json>, +path: String, +i: U32) -> Result<&2, &2, String, List<&2, A>>:
115 match xs:
116 case Nil{}:
117 Done{Nil{}}
118 case Con{x, t}:
119 do Result<&2, &2, String, List<&2, A>>:
120 h : A <- dec(x, path ++ "[" ++ U32.show(i) ++ "]")
121 r : List<&2, A> <- Ty.list.go(~A, ~dec, t, path, (i + 1 : U32))
122 return h <> r