[Haskell-cafe] Faster set intersections?

Jeffrey Brown jeffbrown.the at gmail.com
Sun Dec 9 00:45:49 UTC 2018

The following expressions both cause GHCI to hang:

> S.intersection (S.fromList [1,2]) (S.fromList [1..])
fromList ^CInterrupted.
> S.intersection (S.fromList [1..]) (S.fromList [1,2])
fromList ^CInterrupted.

Is there a smarter way to take the intersection of sets when at least one
of them is small (but I don't know which one that is)?

Jeff Brown | Jeffrey Benjamin Brown
Website <https://msu.edu/~brown202/>   |   Facebook
<https://www.facebook.com/mejeff.younotjeff>   |   LinkedIn
<https://www.linkedin.com/in/jeffreybenjaminbrown>(spammy, so I often miss
messages here)   |   Github <https://github.com/jeffreybenjaminbrown>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20181208/88e644fb/attachment.html>

More information about the Haskell-Cafe mailing list