Use a trait for abstracting over function calls.