[erlang-questions] error on first run

Wes James <>
Fri Mar 26 04:07:26 CET 2010

2010/3/25 黃耀賢 (Yau-Hsien Huang) <>:
> No. Steps are:
> 1. Paste functions in a file, with the head written as
>    -module(mod_name).
>    -compile(export_all).
>   and name the file as 'mod_name.erl'.


Thanks.  I was just doing that from the book.

I put this in a factorial file:


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

and then ran:


and got an error then I remembered I had to do module_name:function(value)

this is an interesting language...


More information about the erlang-questions mailing list