annotate 5-Erlang/networked_client.erl @ 103:98be775c533c default tip

An odd "non-determinism" example from StackOverflow It is clever, but doesn't make much sense as to how it gets its results
author IBBoard <dev@ibboard.co.uk>
date Sun, 14 Jul 2019 13:44:13 +0100
parents 75dbcd30dee5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
78
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 -module(networked_client).
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 -export([translate/2]).
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 translate(To, Word) ->
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 To ! { node(), Word },
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 receive
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 Translation -> io:format("~s~n", [Translation])
75dbcd30dee5 Add final exercise code from Erlang
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 end.