Abstract type: Difference between revisions

Content added Content deleted
Line 111:
There is no constructor for the class. However to prevent the class ever being associated with an instance it suffices to force the validator to fail.
<lang python>class Stack()
def !valid?(object) nil</lang>
tag Stack some-object ; always fails</lang>
 
 
=={{header|Haskell}}==