added arity(fn, n, message) assertion (checks if fn is a function that expects n arguments)