[Haskell-beginners] generating by mapping

Szilveszter Juhos szilva.juhos at gmail.com
Tue Mar 16 04:57:46 EDT 2010


Hi,

I have something like:

data Stuff = Stuff {
                     aNum :: Int
                   , anStr :: String
                   } deriving (Show)

let first = Stuff 123 "qwe"
let second = Stuff 321 "asd"

print first
print second

and works fine. What is the right "map" statement if I want to
generate these stuff using lists like:

let strs = [ "qwe", "asd", "zxc" ]
let nums = [ 123, 321, 345]

?
Cheers:
Szilva


More information about the Beginners mailing list