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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to