<div dir="ltr"><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Yves S. Garret</b> <span dir="ltr"><<a href="mailto:yoursurrogategod@gmail.com">yoursurrogategod@gmail.com</a>></span><br>
Date: Tue, Jul 9, 2013 at 12:43 PM<br>Subject: What does ":gen" do in this case?<br>To: "<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>" <<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>><br>
<br><br><div dir="ltr"><div>I'm looking at this code:<br><br>spawn_CerebralUnits(IdsNPIds, CerebralUnitType, [Id | Ids])-><br> PId = CerebralUnitType:gen(self(), node()),<br> ets:insert(IdsNPIds, {Id, PId}),<br> ets:insert(IdsNPIds, {PId, Id}),<br>
spawn_CerebralUnits(IdsNPIds, CerebralUnitType, Ids);<br>spawn_CerebralUnits(_IdsNPIds, _CerebralUnitType, [])-><br> true.<br><br></div>On the line where PId is bound, you have this<br>"CerebralUnitType:gen(self(), node()),". CerebralUnitType is an atom "cortex". So <br>
what does :gen do in this case?<br></div>
</div><br>Ah, just saw your response Thomas. Yes, you're correct.<br></div></div>