DecodeData.canonical: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/decode_data.bend as DecodeData Lines 198-207 of bendvy-ecs-core@0.1.0.3/decode_data.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&start_line=198&end_line=207 import Base def canonical(fuel:Nat,codec:Codec,raw:Raw) -> Raw: match fuel codec raw: case 0n _ raw: raw case 1n+more Nullable{inner} Null{}: Null{} case 1n+more Nullable{inner} raw: canonical(more,inner,raw) case 1n+more ArrayValue{_} Array{[]}: Array{[]} case 1n++more ArrayValue{+inner} Array{head <> tail}: canonical_array_join(canonical(more,inner,head),canonical(more,ArrayValue{inner},Array{tail})) case 1n+more Struct{[]} Object{_}: Object{[]} case 1n++more Struct{NamedCodec{+name,codec} <> rest} Object{+values}: canonical_struct_join(name,canonical(more,codec,field(name,values)),canonical(more,Struct{rest},Object{values})) case _ _ raw: raw Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Codec https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=NamedCodec https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=Raw https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=canonical_array_join https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=canonical_struct_join https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/decode_data.bend&name=field