This one is a little more tricky since NSCountedSet inherits from NSMutableSet.
Since we would want ASTMap(countedSet, block); to be equivalent to ASTMap((NSSet *)countedSet, block);, "unrolling" versions of map et. al. would need an extra parameter.
E.g.:
// if unroll is YES, calls the block multiple times per element.
NSCountedSet *ASTMap(NSCountedSet *set, BOOL unroll, id(^block)(id obj));
This one is a little more tricky since
NSCountedSet
inherits fromNSMutableSet
.Since we would want
ASTMap(countedSet, block);
to be equivalent toASTMap((NSSet *)countedSet, block);
, "unrolling" versions ofmap
et. al. would need an extra parameter.E.g.: