Abstract type: Difference between revisions
Content added Content deleted
m (Added Sidef language) |
(Nimrod -> Nim) |
||
Line 1,277: | Line 1,277: | ||
</pre> |
</pre> |
||
=={{header| |
=={{header|Nim}}== |
||
In |
In Nim type classes can be seen as an abstract type. Type classes specify interfaces, which can be instantiated by concrete types. |
||
<lang |
<lang nim>type |
||
Comparable = generic x, y |
Comparable = generic x, y |
||
(x < y) is bool |
(x < y) is bool |