This file contains hidden or 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
import scala.collection.Map | |
class PitTree[+T](val children : Map[String, PitTree[T]], val value : Option[T]) extends Map[String, T] { | |
def this() = this(Map(), None) | |
def this(value : T) = this(Map(), Some(value)) | |
def update[T1 >: T](path : String, upVal : T1) : PitTree[T1] = this.+(path -> upVal) | |
override def empty = new PitTree[T] |