remove a bunch of duplication in some multi-arity fn definitions