def stream.finish

bend-kit-http@0.38.2.0 · http.bend:4792

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-zlib@0.5.0.0/zlib.bend as Zlib

4792def stream.finish(decs: List<&1, Zlib.Decoder>) -> IO(Bool):
4793  match decs:
4794    case Nil{}:
4795      IO.pure(Bool, True{})
4796    case Con{d, rest}:
4797      do IO<Bool>:
4798        r : Result<&1, &1, U32 & String, Unit> <- Zlib.dec.finish(d)
4799        tail : Bool <- stream.finish(rest)
4800        return Bool.and(stream.finish.ok(r), tail)

Uses (14)

Used by (3)