Arrays vs tuples / lists

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Tue May 18 16:14:33 CEST 2004


Erik Stenman wrote:
> 
> There is a small difference:
>  [X] Guarantees that the length is 1
>  hd(X) Guarantees that the length is > 1

hd(X) guarantees that the length is >= 1

1> hd([x]).
x
2>

/Uffe  ;-)



More information about the erlang-questions mailing list