Immutable Ring Buffer in Scala