"name":"John"
And we want to store a new key "city" with value "New York".
The map is then updated to:
[ entry "name":"Mike", [ entry "city":"New York", [ ] ] ]
Step 1 uses Set Key and Value Property 1 which sets "processed" to an empty map and "key found" to false.
In step 2, we skip the key "name" since we are looking to replace the key "city".
In step 3, we have reached the end of the map and the key "city" has not yet been found, so we add the new "city":"New York" entry to the map. After that, we just reverse the new map and then use the Transitive Property of Equality to set the result to the new map.
Quiz (1 point)
- result of storing value at key: key in map: entries = output of function store_compute where input key is key, value is value, map is entries, and processed map is [ ]
- output of function store_compute where input key is key, value is value, map is [ entry lkey: lvalue, remaining ], and processed map is kvs = output of function store_compute where input key is key, value is value, map is remaining, and processed map is [ entry lkey: lvalue, kvs ]
- output of function store_compute where input key is key, value is value, map is [ ], and processed map is kvs = reverse of [ entry key: value, kvs ]
- reverse of xs = reverse of remaining stack xs and already reversed stack [ ]
- reverse of remaining stack [ x, xs ] and already reversed stack ys = reverse of remaining stack xs and already reversed stack [ x, ys ]
- reverse of remaining stack [ x, [ ] ] and already reversed stack ys = [ x, ys ]
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
if the following are true:
- a = b
- b = c
then a = c
Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.