Addresses #14. Generalized the mapMethod function to work with binary operators.