This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package repeat | |
abstract class MyList[+A] { | |
def head: A | |
def tail: MyList[A] | |
def isEmpty: Boolean | |
def add[B >: A](element: B): MyList[B] | |
def printElements: String | |
override def toString: String = "[" + printElements + "]" |