Maybe better to define a trait that has that function on it

trait Incrementor {
def incrBy(by: Long): Unit
}

so we aren't dealing with Function1's