[erlang-questions] illegal guard expression with lists:nth

Roberto Ostinelli <>
Thu Jun 11 11:50:09 CEST 2009

hi bengt,

exactly, this is my point. i'm used therefore to nest everything in  
case expressions, such as

case lists:nth(2,List) of

and this does work. thus am i missing a point why this shouldn't be  
allowed in if expressions?

On 11/giu/09, at 11:48, Bengt Kleberg wrote:

> Greetings,
> Not all functions are allowed in a guard. I can not think of any
> function outside of the ones in the erlang module (like  
> erlang:length/1)
> that are allowed.
> bengt

More information about the erlang-questions mailing list