Frame.add.if: def of bend-toon-codec@0.1.0.0 Import: import bend-toon-codec@0.1.0.0/src/frame.bend as Frame Lines 94-101 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=94&end_line=101 import Base import bend-toon-codec@0.1.0.0/src/json.bend as J def add.if(+dup: Bool, +strict: Bool, +k: String, +v: J.Json, +fs: J.Json) -> Result<&2, &2, String, J.Json>: match dup strict: case False{} _: Done{J.JField{k, v, fs}} case True{} True{}: Fail{"duplicate key"} case True{} False{}: Done{set(k, v, fs)} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=bend-toon-codec@0.1.0.0/src/frame.bend&name=set https://jend.leeeet.dev/definition.txt?path=bend-toon-codec@0.1.0.0/src/json.bend&name=Json