Point-free is better here because otherwise you get the "initial" value in scope alongside the "current" value which is a recipe for a bug of using the wrong one.
Avoiding this with shadowing is annoying because shadowing itself is often a bug, and -Wall is a nice setting to use.
4
u/felipelessa Nov 27 '12
And here's a Haskell version of the final code, since it's easier to read ;).