def put

emerging-ezhttp@0.21.0.0 · src/echo.bend:71

import emerging-ezhttp@0.21.0.0/src/echo.bend as Echo
import Base
import emerging-ezhttp@0.21.0.0/src/qs.bend as Qs

71# a cookie put in a store: a stored one of the same name (compared exactly)
72# keeps its place and takes the new value (§5.3 step 11.3 keeps its
73# creation-time, which orders it, §5.4 step 2), else it goes after the others
74def put(jar: List<&2, Qs.Kv()>, +name: String, +value: String)
75  -> List<&2, Qs.Kv()>:
76  match jar:
77    case []:
78      [(name, value)]
79    case (+key, old) <> +t:
80      put.at(key, old, value, t, String.eq(key, name),
81        _u => put(t, name, value))

Uses (6)

Used by (1)