[Haskell-beginners] Printing the entries of a Data.Map m

Manfred Lotz manfred.lotz at arcor.de
Sun May 15 09:32:32 CEST 2011


Hi all,
I have a map with some two thousand entries. Now I want to print that
map.


I could do:
   print m


but I like to use my own print function:
   mapM_ myprint (Map.toList m)


I may be wrong but having to use Map.toList looks pretty inefficient.

Question: I'd like to know if there is a more efficient way to do it?



-- 
Manfred





More information about the Beginners mailing list