recip.py example for documentation

This is still relying on global variables, these should be passed into this function as arguments.