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

2005-10-25 Thread Simon Peyton-Jones
| 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

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

2005-10-25 Thread Creighton Hogg
On Tue, 25 Oct 2005, Simon Peyton-Jones wrote: | 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

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

2005-10-25 Thread Simon Marlow
On 25 October 2005 11:59, Jon Fairbairn wrote: On 2005-10-25 at 12:20+0200 Lemmih wrote: On 10/25/05, Charles SDudu [EMAIL PROTECTED] wrote: Hello, I need to calculate the frequency of each character in a String. And if I can do this really well in C, I dont find a nice (and fast) answer in