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

Christian <>
Fri May 15 23:47:19 CEST 2009


Read the manual:

http://erlang.org/doc/reference_manual/expressions.html#6.11

> The arguments may be of different data types. The following order is defined:
>
> number < atom < reference < fun < port < pid < tuple < list < bit string

Defining the order is very useful for certain algorithms, such as a
binary tree with arbitrary type of keys, where you have a subtree with
keys that are less than, and one that are greater than.



On Fri, May 15, 2009 at 23:29, 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
> 6>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list