Io.stdio.cut: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/io.bend as Io Lines 317-330 of ezmcp@0.1.0.0/src/io.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/io.bend&start_line=317&end_line=330 import Base import emerging-ezjson@1.2.0.0/src/value.bend as Value import ezmcp@0.1.0.0/src/rpc.bend as Rpc import ezmcp@0.1.0.0/src/server.bend as Server import ezmcp@0.1.0.0/src/line.bend as Line # act on a cut's whole lines, then read on with its rest def stdio.cut( ~C: Data, ~run: C -> String -> Value.Json -> IO(Rpc.Out), ~srv: Server.Server, +ctx: C, rev: String, again: List<&2, U32> -> String -> IO(Unit), cut: Line.Cut ) -> IO(Unit): match cut: case Line.Cut{lines, rest}: IO.bind(String, Unit, stdio.lines(C, run, srv, ctx, lines, rev), after => again(rest, after)) Uses (11): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/io.bend&name=stdio.lines https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/line.bend&name=Cut https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Out https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Server