Abstracting over method calls