patched generator behavior for function declarations to avoid body
functions feature complete with doc and tests all passing