The classic example is http://ftp.sunet.se/pub/lang/erlang/examples/small_examples/index.html#0 It's hardly complete, but it's easy to understand.