[erlang-questions] erlang *****
Andras Georgy Bekes
bekesa@REDACTED
Tue Mar 18 12:08:47 CET 2008
> allowing inlined guard expressions
> in the pattern itself, like for example
> {integer(X), _, X>3, atom(Y), Z!=[X,Y]}
> or
> {integer(X>3), _, X, atom(Y), Z!={X,Y]}
> would be equivalent to
> {X, _, X, Y} when is_integer(X), X>3, is_atom(Y), not(Z ~=[X,
> Y]).
I looks nice for the type-testing guard BIFs ( is_* ), but I don't know
how do you want to write the rest of them:
abs(Number)
element(N, Tuple)
float(Term)
hd(List)
length(List)
node()
node(Pid|Ref|Port)
round(Number)
self()
size(Tuple|Binary)
tl(List)
trunc(Number)
?
Georgy
More information about the erlang-questions
mailing list