fixed comment
added test for function with no arguments
added references to Pratt's original paper