[erlang-questions] Beginner: What's wrong with this code?

Vlad Dumitrescu vladdu55@REDACTED
Wed Jun 22 11:09:13 CEST 2011


Hi,

On Wed, Jun 22, 2011 at 11:03, Sid Carter <sidcarter@REDACTED> wrote:
> spawn(?MODULE, format_temps, [{moscow,{f,-40}}, {bangalore,{f,40}},
> {wellington, {c,24}}]),

This tries to find a format_temps that takes three arguments (spawn's
Args argument is a list of the arguments taken by the function). Try
instead

spawn(?MODULE, format_temps, [[{moscow,{f,-40}}, {bangalore,{f,40}},
{wellington, {c,24}}]]),

regards,
Vlad



More information about the erlang-questions mailing list