[Haskell-cafe] Nice way to calculate character frequency in astring

Simon Peyton-Jones simonpj at microsoft.com
Tue Oct 25 08:00:09 EDT 2005


| Ugh! These are all horrid. If something on the lines of
| 
| > calc = accumArray (+) 0 (minBound, maxBound) . (map (\x->(x,1)))
| 
| isn't fast enough, complain to the implementors! What's the
| point of functional programming if one has to twist into a
| shape that allows inspection of one's own fundament to get
| stuff to run in decent time?

I agree.  

Better still, help us make it faster!

Simon


More information about the Haskell-Cafe mailing list