inverse function

Generate the inverse of a function