Echo.put: def of emerging-ezhttp@0.22.0.0 Import: import emerging-ezhttp@0.22.0.0/src/echo.bend as Echo Lines 71-81 of emerging-ezhttp@0.22.0.0/src/echo.bend: https://jend.leeeet.dev/read.txt?path=emerging-ezhttp@0.22.0.0/src/echo.bend&start_line=71&end_line=81 import Base import emerging-ezhttp@0.22.0.0/src/qs.bend as Qs # a cookie put in a store: a stored one of the same name (compared exactly) # keeps its place and takes the new value (§5.3 step 11.3 keeps its # creation-time, which orders it, §5.4 step 2), else it goes after the others def put(jar: List<&2, Qs.Kv()>, +name: String, +value: String) -> List<&2, Qs.Kv()>: match jar: case []: [(name, value)] case (+key, old) <> +t: put.at(key, old, value, t, String.eq(key, name), _u => put(t, name, value)) Uses (6): 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 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.22.0.0/src/echo.bend&name=put.at https://jend.leeeet.dev/definition.txt?path=emerging-ezhttp@0.22.0.0/src/qs.bend&name=Kv