list comprehension question

Carsten Schultz <>
Fri Jul 29 00:11:02 CEST 2005


Charles Blair schrieb:
> [...] and since the documentation for lists:map says "The
> evaluation order is implementation dependent" [...]

The evaluation order is not the same as the order of the elements of the
result list.

lists:reverse(lists:map(F, lists:reverse(Xs)))


lists:map(F, Xs)

yield the same result (if F is without side effects!), ie the orders of
the elements in the result lists are the same, but they do not evaluate
the elements in the same order.



Carsten Schultz (2:38, 33:47)
PGP/GPG key on the key servers,
fingerprint on my home page.

More information about the erlang-questions mailing list