Impl.PipeSession.end.go: def of bend-pipe-session@0.2.0.0 Import: import bend-pipe-session@0.2.0.0/impl.bend as Impl Lines 210-232 of bend-pipe-session@0.2.0.0/impl.bend: https://jend.leeeet.dev/read.txt?path=bend-pipe-session@0.2.0.0/impl.bend&start_line=210&end_line=232 import Base import bend-stdio-pipes@0.2.0.0/impl.bend as Stdio def PipeSession.end.go( fuel: Nat, read: File & Result<&1, &1, U32 & String, Maybe>, +line_cap: U32, said: List<&2, String> ) -> IO(Result<&1, &1, U32 & String, List<&2, String>>): match fuel read: case 0n Tuple{out, _}: do IO>>: File.close(out) return Fail{(5, "the program said too many lines after its input ended")} case 1n+rest Tuple{out, Fail{error}}: do IO>>: File.close(out) return Fail{error} case 1n+rest Tuple{out, Done{None{}}}: do IO>>: File.close(out) return Done{List.reverse(&2, String, said)} case 1n+rest Tuple{out, Done{Some{line}}}: do IO>>: next: File & Result<&1, &1, U32 & String, Maybe> <- Stdio.read_line(out, line_cap) PipeSession.end.go(rest, next, line_cap, String.trim_end(line) <> said) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File.close 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=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.trim_end 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=bend-stdio-pipes@0.2.0.0/impl.bend&name=read_line