Abstract type: Difference between revisions

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