[erlang-questions] Erlang again!

Robert Virding <>
Fri Jul 23 22:21:25 CEST 2010


lists:map(fun (X) -> Y=f(X), {g(Y),h(Y)} end, L)

or

(lc ((<- x l)) (let ((y (f x)) (tuple (g y) (h y))))

Robert

On 23 July 2010 16:28, Vlad Dumitrescu <> wrote:
> On Fri, Jul 23, 2010 at 16:21, David Mercer <> wrote:
>>    [ {g(Y), h(Y)} || X <- L, Y <- [f(X)] ]
>>
>
> Maybe
> [ begin Y=f(X), {g(Y), h(Y)} end || X <- L ]
>
> regards,
> Vlad
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


More information about the erlang-questions mailing list