Improper lists [was: Dialyzer v1.3.0 released]

Thomas Lindgren thomasl_erlang@REDACTED
Tue Mar 29 11:42:09 CEST 2005


--- Carsten Schultz <carsten@REDACTED> wrote:

> 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
> used.

Unless destructive assignment has crept back in, that
doesn't seem lazy to me.

(For readers hazy on the details: laziness entails
evaluating an expression at most once, which is
usually implemented by a reference cell pointing to a
closure. When the value is first demanded, the closure
is evaluated and the reference cell is updated with
the result. Any subsequent demands will then use the
evaluated result. Erlang doesn't have reference cells,
though ... as far as I know. Subsequent demands will
then just re-evaluate the closure.)

Best,
Thomas



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 



More information about the erlang-questions mailing list