Curried to send back result object into replacement function.
Updated example.
version 2.0.0