
2 Jan
2014
2 Jan
'14
9:54 a.m.
Am 23.12.2013 15:57, schrieb Angus Comber:
Why are the brackets required? And what do they signify?
Eg reverse' x:xs = reverse' xs ++ [x] results in a parse error.
I just want to add that "prefix application"/juxtaposition binds stronger than "infix application" and that therefore spaces should be put around infix symbols (like ":") to stress this fact: reverse x:xs is the same as reverse x : xs and both are parsed as (reverse x) : xs which is different from reverse (x : xs) although "x:xs" almost looks like "(x:xs)" Cheers Christian