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

Yves S. Garret yoursurrogategod@REDACTED
Tue Jul 9 18:43:34 CEST 2013


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, [])->
  true.

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130709/b721fdbf/attachment.htm>


More information about the erlang-questions mailing list