[erlang-questions] list comprehensions with predefined functions?

Dominic Williams <>
Wed Jun 18 14:55:37 CEST 2008


> how do i use a predefined function in a listcomprehension?
>
> and if i have 2 variables how do I write then?
>
>
> 42> c(mymath).
> {ok,mymath}
> 43> [mymath:power || X <- [1,2,3] Y <- 3].
> * 1: syntax error before: Y

[mymath: power (X, 3) || X <- [1,2,3]].

Regards,

Dominic Williams
http://dominicwilliams.net

----



More information about the erlang-questions mailing list