Fix deduce-with, and add a test to cover it

TODO

 * Rename deduce-with, maybe let-deduce-with
 * Change deducer->>= and deduce-with to accept a fn rather than
   calling deducer with the arg.