[erlang-questions] specs for fixed length lists

Richard Carlsson carlsson.richard@REDACTED
Sun Jul 8 21:50:54 CEST 2012


On 07/08/2012 11:48 AM, Tony Rogvall wrote:
> BTW
> The 1+1 = 2 example was totally silly in my opinion.

I was just trying to make the point that in the type notation, the 
elements of a list are the union of all possible types of elements that 
can occur anywhere in the list. This discards all information about how 
many elements there may be in a list, and in which order. In that way, 
it's exactly like how e.g. "3" may represent any and all of "1+2", 
"2+1", "1+1+1", and "3".

     /Richard



More information about the erlang-questions mailing list