<div dir="ltr">hey all, <div><br></div><div>just trying to figuring out a few workarounds for a problem I&#39;m having. Im having 2 errors both because of associatedtype. </div><div><br></div><div><b>#1 can be found on the &quot;Vertexable&quot; protocol. This is a strange error which should work but I&#39;m guessing associatedtypes are causing trouble. <span style="color:rgb(0,0,0);font-family:Futura;font-size:14px;font-variant-ligatures:no-common-ligatures">    </span></b></div><div><b style="font-size:14px;color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;">//error: Type &#39;Self.T&#39; does not conform to protocol Equatable</b></div><div><b><br></b></div><div><b>#2 is me trying to create an array of &quot;Vertexable&quot; objects that can have different data types since there are use-cases of graphs with different data types. I can do exactly this when I remove the associatedtype &quot;T&quot; but I would need to remove  EZNode&lt;T&gt; as well and be forced to manually add it in for the &quot;EZVertex&lt;Element: Equatable&gt;&quot; class.  </b></div><div><br></div><div>Error is shown at bottom of this message. You can also refer to <a href="https://www.natashatherobot.com/swift-type-erasure/">https://www.natashatherobot.com/swift-type-erasure/ </a></div><div>for reference and try to create an array of &quot;Pokemon&quot;</div><div><br></div><div>Thank you in advance. Sorry if this was too bulky. Im just looking for conceptual answers to workaround this or why compiler can&#39;t accept this. </div><div>My last option is to plainly remove both protocols but I find it quite ironic if I would have to considering the philosophy of protocols. </div><div><br></div><div><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><b style="color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;;font-size:16px">//Protocol to create a node</b></p></div><div><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>protocol</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> Nodeable : </b></span><span style="line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">Equatable</span><span style="font-variant-ligatures:no-common-ligatures"><b>  {</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(196,34,117)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>associatedtype</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><b> T</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>var</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> data : T { </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>get</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>set</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> }</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>}</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><br></p><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><b style="color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;;font-size:16px">//Value-based node</b><br></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>public</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>struct</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> EZNode&lt;Element: </b></span><span style="line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">Equatable</span><span style="font-variant-ligatures:no-common-ligatures"><b>&gt; : </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>Nodeable</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> {</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><b style="font-size:14px">.....</b></p><p style="font-size:14px;margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="font-size:14px">    .....</b></p><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></p><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>    typealias</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> T = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>var</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> data : </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>T</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>init</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(data: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>T</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>) {</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>self</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> = data</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    }</b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p>
<p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>}</b></span></p></div><div><br></div><div><p style="margin:0px;font-size:14px;line-height:normal;font-family:&#39;Comic Sans MS&#39;;color:rgb(30,148,33)"><span style="font-variant-ligatures:no-common-ligatures"><b>//Protocol to create a vertex</b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>protocol</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> Vertexable : Hashable {</b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="font-size:14px">    .....</b><br></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="font-size:14px">    .....</b></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(196,34,117)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>associatedtype</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><b> T</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(196,34,117)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><b><br></b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>var</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> node: </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">EZNode</span><span style="font-variant-ligatures:no-common-ligatures"><b>&lt;T&gt; { </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>get</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>set</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> }</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><b style="color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;">//error: Type &#39;Self.T&#39; does not conform to protocol Equatable</b></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;"><br></b></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>func</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> getData() -&gt; T</b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>}</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></p><p style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><b><font color="#1e9421" face="Comic Sans MS"><span style="font-size:14px">//Reference-based vertex</span></font></b><b style="color:rgb(0,0,0);font-family:Futura;font-size:14px"><br></b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>class</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> EZVertex&lt;Element : </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">Equatable</span><span style="font-variant-ligatures:no-common-ligatures"><b>&gt; : </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>Vertexable</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>where</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>: </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">Equatable</span><span style="font-variant-ligatures:no-common-ligatures"><b> &amp; </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(97,34,174)">Hashable</span><span style="font-variant-ligatures:no-common-ligatures"><b> {</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>   </b></span></p><p style="margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>     </b></span><b style="font-size:14px">.....</b></p><p style="font-size:14px;margin:0px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="font-size:14px">    .....</b></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>typealias</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> T = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>var</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> node: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>EZNode</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&lt;</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>T</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&gt;</b></span></p><p style="margin:0px;line-height:normal;min-height:23px"><span style="color:rgb(0,0,0);font-family:Futura;font-size:14px;font-variant-ligatures:no-common-ligatures"><b>    </b></span><b><font color="#1e9421" face="Comic Sans MS"><span style="font-size:14px">//alternative that requires manual entry </span>since<span style="font-size:14px"> it doesnt </span>belong<span style="font-size:14px"> to &quot;Vertexable&quot; - var node: EZNod &lt;Element&gt;</span></font></b></p><div><b style="font-size:14px;color:rgb(30,148,33);font-family:&#39;Comic Sans MS&#39;"><br></b></div><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><b style="font-size:14px">    </b><br></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>var</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> hashValue: </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Int</span><span style="font-variant-ligatures:no-common-ligatures"><b> {</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>return</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,27,19)"><b>&quot;</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>\</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,27,19)"><b>(</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>self</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>index</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,27,19)"><b>) </b></span><span style="font-variant-ligatures:no-common-ligatures"><b>\</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,27,19)"><b>(</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>self</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(200,27,19)"><b>)&quot;</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">hashValue</span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    }</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>init</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(element: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>) {</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>self</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>EZNode</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(data: element)</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>self</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>index</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> = index</b></span><b style="font-size:14px">   </b></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    }</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>static</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>func</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> ==(lhs: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>EZVertex</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&lt;</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&gt;, rhs: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>EZVertex</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&lt;</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>&gt;) -&gt; </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Bool</span><span style="font-variant-ligatures:no-common-ligatures"><b> {</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>return</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> lhs.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)">==</span><span style="font-variant-ligatures:no-common-ligatures"><b> rhs.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-size:14px;line-height:normal;font-family:Menlo;font-variant-ligatures:no-common-ligatures;color:rgb(62,30,129)">&amp;&amp;</span><span style="font-variant-ligatures:no-common-ligatures"><b> lhs.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>index</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> == rhs.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>index</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    }</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>func</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> getData() -&gt; </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>Element</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> {</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>        </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>return</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>    }</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0);min-height:23px"><span style="font-variant-ligatures:no-common-ligatures"><b>    </b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">

































</span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b>}</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></p><div><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>let</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> node1 = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>EZNode</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(data: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,53,255)"><b>1</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>)</b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>let</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> node2 = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>EZNode</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(data: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,53,255)"><b>10.0</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>)</b></span></p></div><div><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>let</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> vertex1 = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>EZVertex</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(element: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node1</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>, index: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,53,255)"><b>1</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>)</b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>let</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> vertex2 = </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>EZVertex</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>(element: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>node2</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>.</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>data</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>, index: </b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(4,53,255)"><b>2</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>)</b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><span style="font-size:14px;font-variant-ligatures:no-common-ligatures"><b> </b></span><b style="color:rgb(34,34,34);font-family:arial,sans-serif"><font color="#1e9421" face="Comic Sans MS"><span style="font-size:14px">//protocol &quot;Vertexable&quot; can only be used a generic constraint because it has Self or associatedtype requirements. </span></font></b><b><br></b></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"></span></p><p style="margin:0px;font-size:14px;line-height:normal;font-family:Futura;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(196,34,117)"><b>let</b></span><span style="font-variant-ligatures:no-common-ligatures"><b> arr1 : [</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(60,130,139)"><b>Vertexable</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>] = [</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>vertex1</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>,</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(83,154,164)"><b>vertex2</b></span><span style="font-variant-ligatures:no-common-ligatures"><b>]</b></span></p></div><div><span style="font-variant-ligatures:no-common-ligatures"><b><br></b></span></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Best Regards,<div><br></div><div>Muhammad T. Vali</div></div></div>
</div></div>