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

Haskell Types

Name: Anonymous 2008-02-17 6:34

So I've been learning Haskell for some time, I get some basic and intermediate stuff, some monad basics, but could anyone recommend a good tutorial that explains type system better than YAHT?

Name: Anonymous 2008-02-17 17:15

module Main
    where

import IO

getNums = do
  putStrLn "give numbers"
  number <- getLine
  if number == "0"
     then return []
     else do
       rest <- getNums
       let final = (number : rest)
        in return final


How do I make it return list of factorials of final? What I thought about was mapping read across final, then mapping fact on the list of numbers, but it doesn't work.

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