Newer
Older
zweic / tests / 1 / t3.zwei
@glproj03 glproj03 on 20 Nov 2005 393 bytes *** empty log message ***
class List {
def isEmpty ( ): Int = this.isEmpty ( );
def head ( ): Int = this.head ( );
def tail ( ): List = this.tail ( );
def cons (x : Int ): List = this.cons (x );
// ..
}
class Cons extends List {
val head : Int;
val tail : List;
def isEmpty ( ): Int = false;
def head ( ): Int = this.head;
def tail ( ): List = this.tail;
def cons (x : Int ): List = new Cons (x, this );
}