[Haskell-cafe] Prolog-style list syntax?

Richard O'Keefe raoknz at gmail.com
Thu Jul 8 12:05:42 UTC 2021


I note that
(1) Clean uses ":" in lists the way Prolog uses "|".
(2) Before Prolog switched to "|", Edinburgh Prolog used ",.." (two tokens).
(3) There doesn't seem to be any reason why [p1,p2,p3]++pr could not be
a pattern, where p1, p2, p3 match elements and pr  the rest.  Erlang has
<string literal> ++ <pattern>, but forbids <list pattern> ++ <pattern>,
presumably because it uses "|" like Prolog.


More information about the Haskell-Cafe mailing list