[erlang-questions] {1} > 100 returns true ?!

Kostis Sagonas kostis@REDACTED
Fri May 15 23:44:40 CEST 2009


Steve Kirsch wrote:
> i must admit I am a bit baffled by why this isn't an error:
> 
> 4> {1,3} > 100.
> true
> 5> {1} >100.
> true

Why should this be an error?  In Erlang, the order between all terms is 
well-defined.  How else could you sort the list [{1}, 42, gazonk] ??

Eshell V5.7.2  (abort with ^G)
1> lists:sort([{1}, 42, gazonk]).
[42,gazonk,{1}]

Kostis



More information about the erlang-questions mailing list