Frame.pop: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/frame.bend as Frame Lines 186-195 of bend-toon-codec@0.1.0.0/src/frame.bend: https://jend.leeeet.dev/read.txt?path=bend-toon-codec@0.1.0.0/src/frame.bend&start_line=186&end_line=195 import Base # Close every frame whose child depth is at least `t`. `fuel` is the stack # height, enough for every frame to close. def pop(+fuel: Nat, +sr: Result<&2, &2, String, St>, +t: U32, +strict: Bool) -> Result<&2, &2, String, St>: match fuel sr: case 0n _: sr case 1n+p Fail{e}: Fail{e} case 1n+p Done{st}: pop(p, close.if(should_pop(stk.of(st), t), st, strict), t, strict) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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=bend-toon-codec@0.1.0.0/src/frame.bend&name=St https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/frame.bend&name=close.if https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/frame.bend&name=should_pop https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/frame.bend&name=stk.of