Added ability to call anonymous function as a registered dispatch event.
Added anonymous function example.