TraceContext.TraceDraw.take: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext Lines 1057-1068 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=1057&end_line=1068 import Base # Add a word to the current trace ID candidate. The fourth word completes it, # most significant first, and the candidate is checked. def TraceDraw.take(word: U32, remaining: Nat, words: TraceWords, excluded: Maybe<&2, TraceId>) -> TraceStep: match words: case NoTraceWord{}: NeedTraceWord{TraceDraw{remaining, OneTraceWord{word}, excluded}} case OneTraceWord{first}: NeedTraceWord{TraceDraw{remaining, TwoTraceWords{first, word}, excluded}} case TwoTraceWords{first, second}: NeedTraceWord{TraceDraw{remaining, ThreeTraceWords{first, second, word}, excluded}} case ThreeTraceWords{first, second, third}: TraceDraw.check(Draw.asserted(TraceId.from_words(first, second, third, word)), excluded, remaining) Uses (10): 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Draw.asserted https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceDraw https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceDraw.check https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceId https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceId.from_words https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceStep https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=TraceWords