add mod, and a helper routine for applying binary ops

FIXME: times and others could use this
bernouilli

note, not in @sym b/c it can be called with a double