def states
import cswap-bend-cli@0.1.0.0/collect.bend as Collectimport Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
275def states(xs: List<&2, Info>, +rows: Json.Json, +now: U32) -> IO(List<&2, St>):
276 match xs:
277 case Nil{}:
278 IO.pure(List<&2, St>, [])
279 case Con{h, t}:
280 IO.bind(St, List<&2, St>, st.of(h, rows, now), s => IO.bind(List<&2, St>, List<&2, St>, states(t, rows, now), rest => IO.pure(List<&2, St>, s <> rest)))