Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Here you go: an example of top-down FP

by tmoertel (Chaplain)
on Jun 28, 2005 at 01:43 UTC ( #470445=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    module Main where
    
    ...
    showOutput = id
    process    = id
    readInput  = id
    
  2. or download this
    module Main where
    
    ...
    
    show1 key count = (unwords [key, show count] :)
    accumulate hash key = Map.insertWith (+) key 1 hash
    
  3. or download this
    module Main (main) where
    
    ...
    control f  = readFiles >>= writeIndex . f
    readFiles  = getArgs >>= liftM concat . mapM readFile
    writeIndex = writeFile "words.index"
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://470445]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-07-04 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls