Serge D. Mechveliani wrote:
> As Jens Fisseler notes, I have made a confusion about
> 
> Set.elems, Set.toList, Set.setToList.

There is even Set.toAscList (although one may argue that should be
Set.toDistinctAscList)

I think the right choice is Set.toList (replacing setToList)

Is Set.elems just a (nicer?, useless?) synonym for Set.toList?
There are also Map.assocs and Map.toList being synonyms.

But Map.elems is different from Map.toList and Set.elems would only
correspond to Map.elems for some identity maps (not for the old set
implementation using maps with dummy elements "()")

Cheers Christian

P.S Map.insert indeed replaces existing values (and should be used
instead of addToFM with changed argument position for the input map)
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to