Scala data structures, category and algorithms