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

Girl ♥ Haskell

Name: The Haskell Programming Girl 2012-06-23 6:37

Haskell and I have a lot in common: we are both advanced, purely-functional, and open-sourced; we both have twenty years of cutting-edge research experience, can develop robust, concise, correct software rapidly; we both have strong support for integration with others; we both have built-in concurrency and parallelism; we are both great debuggers and profilers; we both love our rich libraries and our active community; we both produce flexible, maintainable, high-quality software.

My love for Haskell is an infinite and uncountable monad, a Cartesian closed category if you will. If you lack the sophistication to appreciate my immutable passion, you can D.I.A.F.

http://girlloveshaskell.com/

Name: Anonymous 2012-06-23 18:47

divide a b = rem b a == 0

fizzbuzz' x
        | 15 `divide` x = "FizzBuzz"
        | 3 `divide` x  = "Fizz"
        | 5 `divide` x  = "Buzz"
        | otherwise     = show x
fizzbuzz n = take n [ fizzbuzz'    x | x <- [1..n] ]

printListLn :: [String] -> IO ()
printListLn [] = return ()
printListLn (car:cdr) = do
             putStrLn car
             printListLn cdr

main = printListLn $ fizzbuzz 30


I started learning Haskell 45 minutes ago and wrote this. Is it good style?

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