I have a set, Set<A> and a subset of that, Set<B>, where B: A. I want to 
subtract Set<B> from Set<A>, but the subtract function signature specifies that 
the set elements must be the same type (S.Generator.Element == Element). I 
guess this is because Element is not required to be a class, simply hashable, 
therefore inheritance is not guaranteed? Is there any way this could be 
implemented in Set, in an extension, or what would be the most efficient way to 
perform that operation?

Thanks

Nick
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to