
21 Jul
2010
21 Jul
'10
3:13 a.m.
There's nothing wrong with the use of your example, I'm guessing it's
something in your ... that's leading to the parse error. This compiles
just fine:
f a b
| c > 1 = 1
| c < 1 = 2
| otherwise = 3
where c = a+b
Nick
On Wed, Jul 21, 2010 at 8:01 AM, Eitan Goldshtrom
I'm trying to fit a where clause to some guards I'm using. I have the following
f a b | c > 1 = ... | c < 1 = ... | otherwise = ... where c = a+b
yet I'm getting a parsing error. Is this not the correct way to combine "where" with "guards"?
-Eitan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe