> `[ x, y, z | zs ]` is also valid; [...]
> That structure is particularly ugly in Haskell syntax.
how so? `x : y : z : zs`
Because almost always you need to put parens round -- certainly in a pattern match.
And it's not square brackets, which would say 'here comes a list'.
Prolog list syntax is ugly here because
the "cons" operator (|) needs special parentheses.
Exactly! Special list-heralding brackets.
Well, a similar thing in Haskell ist the ".."
(enumFromTo) operator.
@Jeff But I actually like this the best:
[x, y, z, zs...] = list
Or maybe
> [x, y, z, zs@..] = list
Could be an as-pattern binding to the tail. But now it's getting heavyweight.