Executing boolean expressions on a list
    Pierpaolo BERNARDI 
    bernardp@REDACTED
       
    Fri Mar 14 23:57:47 CET 2003
    
    
  
From: "Shawn Pearce" <spearce@REDACTED>
> I'm trying to keep it tail-recursive.  I thought about:
...
> which I didn't like because of the formatting of the if statement, and:
> 
> recursive(N, [H | T]) -> somef(N, H) and recursive(N, T);
> recursive(N, []) -> true.
> 
> but was worried about order of evaluation on the and operator
> and not being able tail-recursive.
andalso should be good here.
P.
    
    
More information about the erlang-questions
mailing list