Newer
Older
zweic / tests / 1 / t3.zwei
@glproj03 glproj03 on 20 Nov 2005 393 bytes *** empty log message ***
  1. class List {
  2. def isEmpty ( ): Int = this.isEmpty ( );
  3. def head ( ): Int = this.head ( );
  4. def tail ( ): List = this.tail ( );
  5. def cons (x : Int ): List = this.cons (x );
  6. // ..
  7. }
  8. class Cons extends List {
  9. val head : Int;
  10. val tail : List;
  11. def isEmpty ( ): Int = false;
  12. def head ( ): Int = this.head;
  13. def tail ( ): List = this.tail;
  14. def cons (x : Int ): List = new Cons (x, this );
  15. }