toDecorator

Transforms a function into a decorator function.

Example