[erlang-questions] ++ operator

Masklinn masklinn@REDACTED
Wed Oct 31 19:11:17 CET 2012


On 2012-10-31, at 18:57 , Daniel Luna wrote:
> Fun fact: Common LISP does the exact same thing when it comes to
> append and cons.

I'm pretty sure all lisps do[0], dotted pairs[1] are rather important
elements of the family: they are often used to replace 2-tuples as the
basis of non-list datastructures, as most lisps lack tuples (a dotted
pair is more efficient as there isn't an intermediate cons cell to
deref between the first and the second value)

[0] except for Clojure

[1] in the sense of improper lists, conses chains whose final element is
    not `nil`, technically all lists can be written as dotted pairs in 
    the most general meaning thereof



More information about the erlang-questions mailing list