[erlang-questions] How to send a message to all nodes without UDP broadcast?

Ulf Wiger <>
Thu Mar 18 08:37:43 CET 2010

On Thu, 18 Mar 2010 01:29:33 +0100, Martin Logan <>  

> You probably want to go with a foreach instead of a comprehension.
> There is no need to collect and then discard the results of each use
> of ! :)

Yes... there was a discussion about this some time ago on the
list. I can't be bothered to dig it up, but remember partly because
I argued for LCs to not build the result unless it was needed.

In a very recent post, Bernard Duggan pointed to a section in the
Efficiency Guide:


"In R12B [and presumably later], if the result of the list comprehension
will *obviously* not be used, a list will not be constructed."

...so there is hope still, for those who prefer the LC style over
foreach. :)

Ulf W
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd



Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.


More information about the erlang-questions mailing list