hi,
  I am a newbie to Haskell. I am reading the tutorial by Hal Daume III. Regarding the 
function types which are an extension of lambda calculus, I was wondering if at all it 
is possible to write a type that would return two values as the output - something 
like a square function which would take a pair and return a  pair.
 I tried this, but there are errors

square :: (Num a, Num b) => (a ,b)
square (x , y) = (x*x , y*y)
How can I specify that the square functions output would be a pair ?

thank you
gangadhar



_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to