JSONAssemblyProof.array_first: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend as JSONAssemblyProof Lines 107-120 of qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend&start_line=107&end_line=120 import Base import qasim-bend-kit@0.1.0.2/libs/JSON.bend as J def array_first(+value: J.Value, -tail: List, +acc: List<&2, J.Value>, +kont: J.ParserKont) -> {J.assemble(tokens(value, Whole{}, tail), J.ArrayFirst{kont}) == J.assemble(tokens(value, Whole{}, tail), J.NeedValue{J.InArray{Nil{}, kont}}) : R()}: match value: case J.Arr{Nil{}}: {==} case J.Arr{head <> rest}: {==} case J.Obj{Nil{}}: {==} case J.Obj{(key, head) <> rest}: {==} case J.Null{}: array_first_atom(J.decode_payload("null"), tail, kont) case J.Bool{True{}}: array_first_atom(J.decode_payload("true"), tail, kont) case J.Bool{False{}}: array_first_atom(J.decode_payload("false"), tail, kont) case J.Number{s, cert}: array_first_atom(J.decode_payload(s), tail, kont) case J.Str{s}: array_first_atom(J.decode_payload("\"" ++ J.escape_string(s) ++ "\""), tail, kont) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=Assembly https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=ParserKont https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=Token https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=Value https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=assemble https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=decode_payload https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/JSON.bend&name=escape_string https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend&name=Mode https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend&name=R https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend&name=array_first_atom https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/JSON_AssemblyProof.bend&name=tokens