aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/tutorial/complex3.erl
blob: f2e9c2c171c70b478a1d86d927bcc2b399dcfba3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-module(complex3).
-export([foo/1, bar/1]).

foo(X) ->
    call_cnode({foo, X}).
bar(Y) ->
    call_cnode({bar, Y}).

call_cnode(Msg) ->
    {any, c1@idril} ! {call, self(), Msg},
    receive
	{cnode, Result} ->
	    Result
    end.