Abstract type: Difference between revisions

Content added Content deleted
Line 136: Line 136:
setq !items (cdr !items)
setq !items (cdr !items)
tmp</lang>
tmp</lang>
Now we instantate a concrete object and validate that it conforms to the Abstract type:
Now we can tag an object that it conforms to the Interface:
<lang python>(XYZstack(!new)) : StackInterface</lang>
<lang python>tag StackInterface (XYZstack(!new))</lang>


=={{header|Haskell}}==
=={{header|Haskell}}==