[erlang-questions] Fwd: What does ":gen" do in this case?

Yves S. Garret yoursurrogategod@REDACTED
Tue Jul 9 18:58:49 CEST 2013

---------- Forwarded message ----------
From: Yves S. Garret <yoursurrogategod@REDACTED>
Date: Tue, Jul 9, 2013 at 12:43 PM
Subject: What does ":gen" do in this case?
To: "erlang-questions@REDACTED" <erlang-questions@REDACTED>

I'm looking at this code:

spawn_CerebralUnits(IdsNPIds, CerebralUnitType, [Id | Ids])->
  PId = CerebralUnitType:gen(self(), node()),
  ets:insert(IdsNPIds, {Id, PId}),
  ets:insert(IdsNPIds, {PId, Id}),
  spawn_CerebralUnits(IdsNPIds, CerebralUnitType, Ids);
spawn_CerebralUnits(_IdsNPIds, _CerebralUnitType, [])->

On the line where PId is bound, you have this
"CerebralUnitType:gen(self(), node()),".  CerebralUnitType is an atom
"cortex".  So
what does :gen do in this case?

Ah, just saw your response Thomas.  Yes, you're correct.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130709/048ee6d7/attachment.htm>

More information about the erlang-questions mailing list