We want to be able to type functions that take some abstract HMap and returns a HMap that is modified from the original.
eg. Add an :a entry to some HMap.
(ann add-a (All [x] [x -> (Assoc x :a Number)])) (defn add-a [m] (assoc m :a 1))
Can this be used as a starting point for expressing assoc as a first class type? We need some way of unrolling pairs of arguments into repeated Assoc calls.
(ann assoc (All [m x ...2] [m x ...2 x -> (Assoc m x ...2 x)])) (ann dissoc (All [m x ...] [m x ... x -> (Dissoc m x ... x)]))