Implement apply with multiple arguments.