Sitzman wrote:
> Now, I already wrote a prodPair function that takes a product and returns
> its pair (and that works fine)..ie:
> > prodPair [1,2] [11,12,100]
> [11,24]
Looks like you probably have the basic algorithm right. Now you just
need to figure out a way to make pairs instead of products...
> Oh, and to make life more interesting, I also given a 'data pair type'
> > data Pair = Pair Int Int deriving Show
Here's a little piece of info that you may or may not know. The 'Pair'
data type has a "constructor" function. That function has the following
type:
Pair :: Int -> Int -> Pair
(hint, hint)
> .. This is my first attempt at haskell -- and although I am not looking
> for the solution, I was wondering if anyone could help me :()
Hope I didn't give away too much. :-)
- Michael Hobbs