[erlang-questions] Re: Unicast 20k messages, $500-$1000 bounty

Witold Baryluk baryluk@REDACTED
Thu Jul 16 16:02:25 CEST 2009


Dnia 2009-07-16, czw o godzinie 14:57 +0100, Paulo Sérgio Almeida pisze:
> Hi Joel,

> - iterate the list in a tight loop as in:
> 
>    send([], _M) -> ok;
>    send([H|T], M) -> H ! M, send(T, M).

List comprehension can be faster:

send(L, M) ->
	[ H ! M || H <- L],
	ok.

-- 
Witold Baryluk <baryluk@REDACTED>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: To jest cz??? wiadomo?ci podpisana cyfrowo
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090716/345049fd/attachment.bin>


More information about the erlang-questions mailing list