class List { def head() : Int = this.head(); def tail() : List = this.tail(); def printString() { } def printStringLn() { do this.printString(); printChar(10); } } class Nil extends List { } class Cons extends List { val head : Int; val tail : List; def head() : Int = this.head; def tail() : List = this.tail; def printString() { printChar(this.head); do this.tail.printString(); } } { do "Bonjour".printStringLn(); }