Camber.transforms: def of bend-kit-camber@0.15.0.1 Import: import bend-kit-camber@0.15.0.1/camber.bend as Camber Lines 764-780 of bend-kit-camber@0.15.0.1/camber.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-camber@0.15.0.1/camber.bend&start_line=764&end_line=780 import Base import bend-kit-http@0.38.1.1/http.bend as Http def transforms(~S: Type, ~K: Data, ~E: Data, ~H: Data, ~hook: H -> S -> K -> Http.Res -> IO(S & Result<&2, &1, Error, Http.Res>), ~mapper: S -> K -> Error -> IO(S & Result<&2, &1, Error, Http.Res>), hooks: List<&2, H>, +config: K, completion: Completion ) -> IO(Completion): match hooks: case Nil{}: IO.pure(Completion, completion) case h <> rest: match completion: case Completed{state, response, entered, mapped, True{}}: IO.pure(Completion, Completed{state, response, entered, mapped, True{}}) case Completed{state, response, +entered, +mapped, False{}}: do IO>: changed : S & Result<&2, &1, Error, Http.Res> <- hook(h, state, config, response) next : Completion <- transformed(~S, ~K, ~E, ~H, ~mapper, config, entered, mapped, changed) transforms(~S, ~K, ~E, ~H, ~hook, ~mapper, rest, config, next) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Completion https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=transformed https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Res