Openapi.params.put: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/openapi.bend as Openapi Lines 760-767 of ezmcp@0.1.0.0/src/openapi.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/openapi.bend&start_line=760&end_line=767 import Base import emerging-ezjson@1.2.0.0/src/value.bend as Value # parameters with `new` in the place of the first that is the same # parameter (`same`), else last def params.put(ps: List<&2, Value.Json>, +new: Value.Json) -> List<&2, Value.Json>: match ps: case []: [new] case +old <> +rest: params.put.at(same(old, new), old, rest, new, _u => params.put(rest, new)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=params.put.at https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/openapi.bend&name=same