Catenable deques in Scala