It's a good example of how quickly you can express an algorithm, but in terms or readability, some additional whitespace, and possibly some better naming would make it nicer.
Once you understand what bits like "p:xs", "++" and "[x|y,z]" mean though, it will make much more sense.
Once you understand what bits like "p:xs", "++" and "[x|y,z]" mean though, it will make much more sense.