-* At the top of p. 13 (this is in between defs 2.8 and 2.9), GS&V give two examples, one for \[[∃xPx]] and the other for \[[Qx]]. In fact it will be easiest for us to break \[[∃xPx]] into two pieces, \[[∃x]] and \[[Px]]. Let's consider expressions like \[[Px]] (or \[[Qx]]) first.
+ we'll just talk about \[[expression]] and let that be a monadic value, implemented in part by a function that takes `(r, h)` as an argument.
+
+* In def 2.7, GS&V talk about an operation that takes an existing set of discourse possibilities, and *extends* each member in the set by (i) allocating a new location in the store, (ii) putting some entity `d` from the domain in that location, and (iii) assigning variable `x` to that location in the store.
+It will be useful to have a shorthand way of referring to this operation:
+
+ let new_peg_and_assign (var_to_bind : char) (d : entity) =
+ fun ((r, h) : assignment * store) ->
+ (* first we calculate an unused index *)
+ let newindex = List.length h
+ (* next we store d at h[newindex], which is at the very end of h *)
+ (* the following line achieves that in a simple but inefficient way *)
+ in let h' = List.append h [d]
+ (* next we assign 'x' to location newindex *)
+ in let r' = fun v ->
+ if v = var_to_bind then newindex else r v
+ in (r',h')