TraceContext.Entries.drop_last_large: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 2441-2449 of bend-trace-context@0.2.0.0/trace_context.bend: https://jend.leeeet.dev/read.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&start_line=2441&end_line=2449 import Base # The entries without the rightmost one larger than 128 octets: an entry # stays when a large entry follows it. def Entries.drop_last_large(entries: List<&2, StateEntry>) -> List<&2, StateEntry>: match entries: case Nil{}: Nil{} case Con{+entry, +rest}: Bool.pick(List<&2, StateEntry>, Entries.has_large(rest), Con{entry, Entries.drop_last_large(rest)}, Bool.pick(List<&2, StateEntry>, StateEntry.is_large(entry), rest, Con{entry, rest})) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Entries.has_large https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=StateEntry https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=StateEntry.is_large