I know they do not hold across pattern matches (i.e. you need to rewrite the 'where' clause for each pattern), but how does the scoping work for guards?
e.g. Does this work?
myFunction x1 x2
| x1 > x2 = addOne x1
| x1 < x2 = addOne x2
| otherwise = x1
where addOne = (1+)
Or should it be this?
myFunction x1 x2
| x1 > x2 = addOne x1
where addOne = (1+)
| x1 < x2 = addOne x2
where addOne = (1+)
| otherwise = x1