guards

Dave Pawson dave.pawson@REDACTED
Sat Jul 25 04:50:13 CEST 2009


filterHelper(Lst,Int,Result) when ((length(Lst) == 1) and
(lists:nth(1,Lst) =< Int)) ->
    [lists:nth(1,Lst) | Result];

and I'm told

./math4.erl:132: illegal guard expression


I believe I can't use 'user defined' references in a guard statement,
but I'm unsure if  lists: module is such a statement?

Suggestions please

TIA

-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk


More information about the erlang-questions mailing list