What gets returned is a new Set, which is the result of re-chunking. The problem is that if there is a codegen typed registered for that type, then the result will be codegen type and thus fail the type assertion to .(Set).
Thus, all mutative APIs for collections, must ensure their return value is "unwrapped" (and in the case their is a wrapper, the typed wrapper will then "re-wrap" =-(
e.g.
(Compound)Set(Leaf).Insert().
What gets returned is a new Set, which is the result of re-chunking. The problem is that if there is a codegen typed registered for that type, then the result will be codegen type and thus fail the type assertion to
.(Set)
.Thus, all mutative APIs for collections, must ensure their return value is "unwrapped" (and in the case their is a wrapper, the typed wrapper will then "re-wrap" =-(