Allow recur within functions. Fixes #6.