Update GH URI
[cellular-automata.git] / 001 / src / life_lib.erl
... / ...
CommitLineData
1-module(life_lib).
2
3-export([cast_one2all/2
4 ,cast_all2one/2
5 ]).
6
7
8% Cast all messages to one destination
9cast_all2one(_, []) -> ok;
10cast_all2one(Server, [Msg | Msgs]) ->
11 ok = gen_server:cast(Server, Msg),
12 cast_all2one(Server, Msgs).
13
14
15% Cast one message to all destinations
16cast_one2all([], _) -> ok;
17cast_one2all([Server | Servers], Msg) ->
18 ok = gen_server:cast(Server, Msg),
19 cast_one2all(Servers, Msg).
20
This page took 0.026838 seconds and 4 git commands to generate.