Abstract type: Difference between revisions

Content added Content deleted
m (Added Sidef language)
(Nimrod -> Nim)
Line 1,277: Line 1,277:
</pre>
</pre>


=={{header|Nimrod}}==
=={{header|Nim}}==
In Nimrod type classes can be seen as an abstract type. Type classes specify interfaces, which can be instantiated by concrete types.
In Nim type classes can be seen as an abstract type. Type classes specify interfaces, which can be instantiated by concrete types.
<lang nimrod>type
<lang nim>type
Comparable = generic x, y
Comparable = generic x, y
(x < y) is bool
(x < y) is bool