···130130 | Object pairs -> (
131131 let k = String key in
132132 match List.assoc_opt k pairs with Some v -> v | None -> Undefined)
133133+ | Set xs ->
134134+ (* For sets, [s.k] is shorthand for set-membership: returns the
135135+ element when present, undefined when absent. *)
136136+ let target = String key in
137137+ if List.exists (fun v -> compare target v = 0) xs then target
138138+ else Undefined
133139 | _ -> Undefined
134140135141let index idx = function