5 comments

[ 3.0 ms ] story [ 25.4 ms ] thread
A note about Steve Vinoski, if you ever need a book on the CORBA protocol go straight to his Advanced CORBA Programming in C++, beautiful book.
Clause order matters.

--

  -module(ping).
  -export([ping/2]).

  ping(N, Pid) ->
      Pid ! ping,
      receive
          pong ->
              ping(N-1, Pid)
      end;
  ping(0, _Pid) ->
      ok.

  erlc ping.erl
  ping.erl:10: Warning: this clause cannot match because a
  previous clause at line 4 always matches