Renamed length to arity to avoid collision.