def run

bend-kit-archive@0.5.1.0 · archive.bend:346

import bend-kit-archive@0.5.1.0/archive.bend as Archive
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

346def run(xs: List<&2, Header>, st: Bytes.Bytes & Result<&1, &1, U32 & String, U32 & List<&1, Entry>>) -> IO(Result<&1, &1, U32 & String, List<&1, Entry>>):
347  match xs:
348    case Nil{}:
349      (input, res) = st
350      IO.pure(Result<&1, &1, U32 & String, List<&1, Entry>>, run.fin(res))
351    case Con{hd, t}:
352      (input, res) = st
353      match res:
354        case Fail{e}:
355          IO.pure(Result<&1, &1, U32 & String, List<&1, Entry>>, Fail{e})
356        case Done{(+left, acc)}:
357          do IO<Result<&1, &1, U32 & String, List<&1, Entry>>>:
358            next : Bytes.Bytes & Result<&1, &1, U32 & String, U32 & List<&1, Entry>> <- one(hd, input, left, acc)
359            run(t, next)

Uses (14)

Used by (1)