error on first run

Wes James comptekki@REDACTED
Fri Mar 26 03:36:35 CET 2010


I'm new to erlang and I've compiled and installed on os x.  I'm going
through the Erlang Programming 1st edition book.  I fired up erl from
the cli and I pasted:

factorial(0) -> 1;
factorial(N) ->
N * factorial(N-1).

but I get the error:

* 1: syntax error before: '->'

What am I doing wrong?

thx,

-wes


More information about the erlang-questions mailing list