Function with a state

An example showing how to create function with a state using Tizen 2.3.