On 29 Apr 2015 05:12, "Matt Oliveri" <[email protected]> wrote:
> My understanding from the video is that with this kind of solution,
> you still wouldn't be able to union sets efficiently, because the sets
> may come from people using different Ord instances for the element
> type. Unless the union code and both sets all come from within the
> lexical scope of the same "use" directive; but that restriction seems
> onerous.
If the two orderings define uniqueness differently, say people ordered by
age in one set, and people ordered by name in another, then to union them
is a nonsense.
In some regards all sets need to use the same ordering.
The definition of union should be (using braces for the implicit parameter):
union :: {Ord a} -> Set a -> Set a -> Set a
Keean.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev