[Haskell-cafe] a newbie's question
Tom Harke
harke at cs.pdx.edu
Thu Apr 21 13:38:19 EDT 2005
You forgot to bind a name to your do-expression. Try:
foo = do x <- a
y <- b
return (x,y)
On Thu, 21 Apr 2005, SCOTT J. wrote:
] Hi,
]
] I'm beginning to study Haskell, For the following
]
] a = [1,2,3]
]
] b = "there"
]
]
]
] do x <- a
]
] y <- b
]
] return (x , y)
]
] Winhugs cannot run it. Gives
]
] Syntax error in input (unexpected backslash (
] lambda))
--
Tom Harke
Ph.D. Student
Computer Science
Portland State University
More information about the Haskell-Cafe
mailing list