illegal guard expression with lists:nth

Roberto Ostinelli <>
Thu Jun 11 11:37:42 CEST 2009

dear all,

why does the following expression give me an 'illegal guard  
expression' at compile?

	lists:nth(2, List) =:= "test" ->

lists:nth returns a term, thus i should be enabled to use it. on the  
contrary, the following expression is accepted:

	length(List) =:= 3 ->

am i missing a point?


More information about the erlang-questions mailing list