Included information about defining states as a function

This tidbit burned me badly a few days ago. I think it deserves a little mention in the documentation.

Love this library, btw. Using it heavily in production at YouNow.