Scala, Functional Programming, Dependent Types