[erlang-questions] guards
Dave Pawson
dave.pawson@REDACTED
Sat Jul 25 05:31:33 CEST 2009
2009/7/25 Michael Truog <mjtruog@REDACTED>:
> - Can't use parentheses in guards
> - All the guards are in the erlang module and are explicitly documented
> as allowed in guard expressions
> (usually is_something/1, erlang:length/1 works but supposedly is O(n),
> not O(1) like the others)
> - use "," for and, otherwise ";" for or... they evaluate in a sequential way
Thanks. Not clear in the book I'm using (uses guard(X,Y) when ....
and ... or => etc.
> - Specifying the type in the function argument is always faster than
> adding a guard function for the type
> (as seen in the "The is_record() guard" thread)
I'll go hunting!
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
More information about the erlang-questions
mailing list