[Haskell-cafe] First Question
Jared Updike
jupdike at gmail.com
Sun Mar 19 11:56:55 EST 2006
> I think you're looking for:
>
> stops x y = x+y
>
> Or use your own definition and change the type to stops:: (Int,Int) -> Int
> It's generally recommended not to send the parameters of your function
> as a tuple (like you're doing) but rather "one at a time" like the
> example I gave above.
>
Also, types in Haskell have initial capital letters.
> stops :: Int->Int->Int
Try reading the tutorial here if you haven't seen it yet; it's geared
toward programmers who know other languages but not Haskell:
http://www.isi.edu/~hdaume/htut/
or any of the tutorials listed on this page:
http://haskell.org/learning.html
and this is a great list of FAQs:
http://haskell.org/hawiki/HaskellNewbie
Enjoy and welcome!
Jared.
--
http://www.updike.org/~jared/
reverse ")-:"
More information about the Haskell-Cafe
mailing list