Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C

Name: Jhonson 2011-03-09 5:06

Can you help me write a program that finds what lowercase symbols are used most in a binary file?

Name: Anonymous 2011-03-09 10:30

>>17
There. Not much of a point in doing this, though, since it's actually longer than the original.

import Data.Ix
import Data.Ord
import Data.List
import Control.Arrow

main =
   interact $ intercalate "\n" . map (uncurry (++) . ((:" ") *** show)). reverse
                               . sortBy (comparing snd) . map (head &&& length)
                               . group . sort . filter (inRange ('a','z'))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List