r/haskellquestions • u/spartan12321 • Oct 10 '18
Multiple variables defined inside function
I get error on this code if i want ot declare second variable
foo x =
y + yy
where y = x + 1
yy = (-x)
My example is much more complicated, this is simplifed version. I can't find example of declaring multiple variable inside function. Is this incorect way of thinking and I should add two functions as parameters instead?
0
Upvotes
4
u/ihamsa Oct 10 '18
This is useless.
This is something that can be discussed.