adds reduce.idx and arity*