complete apply functions with arbitrary numbers of arguments