Improper lists [was: Dialyzer v1.3.0 released]

Carsten Schultz carsten@REDACTED
Mon Mar 28 19:47:48 CEST 2005


On Mon, Mar 28, 2005 at 08:28:34AM -0600, James Hague wrote:
> >  > In theory you could have a special type tag for "two element tuple"
> > 
> > Apart from not being a tuple, isn't that exactly what a cons cell is?!
> Yes, of course.  But "not being a tuple" is what matters :)  You have
> two ways of representing a pair:
> {a,b}
> [a|b]
> But is [a|b], when used to store two arbitrary values, an efficiency
> hack or simply taking full advantage of cons cells?  Certainly {a,b}
> is more, uh, "Erlangian."

Some of the messages were like

    Cons will produce a non-proper list since its 2nd arg is 
    (() -> possibly_improper_list())!

This looks to me like a lazy list, so I can understand that [ | ] is


Carsten Schultz (2:38, 33:47)
PGP/GPG key on the key servers, 
fingerprint on my home page.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the erlang-questions mailing list