[Haskell-cafe] Origins of (x:xs)?
Paul Hudak
paul.hudak at yale.edu
Tue Dec 19 17:54:54 EST 2006
Pattern matching goes back to Burstall and Darlington's work in the 1970's.
As for "x:xs", the "xs" is meant to be the plural of "x", and is
pronounced "exs" (I guess...).
Similarly, "n:ns" is one n followed by many more "ens". Make sense?
(By the way, ":" is often pronounced "followed by".)
-Paul Hudak
Toby Hutton wrote:
> Hi,
>
> This may have been asked before, sorry if so. I've wondered where the
> convention of pattern matching a list to (x:xs) came from? I've read
> a couple of old papers recently which let me believe it may have
> started back in the '70s with Miranda and its ilk.
>
> Does anyone know why (x:xs)? Is xs meant to be a synonym for 'excess'?
>
> Yours curiously,
> Toby.
More information about the Haskell-Cafe
mailing list