Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Tail recursion #11

Merged
merged 2 commits into from Jan 18, 2012
Merged

Tail recursion #11

merged 2 commits into from Jan 18, 2012

Conversation

chrismgray
Copy link
Contributor

Another example for the analyzer: this finds things that look like tail recursion and warns that they should be replaced by recur. (Nothing in the standard library needs this.)

There are two areas where this could be improved: first, it would be nice to track the arity of the part of the function being analyzed, so that spurious warnings from multi-arity functions would not happen. Second, it would be nice to check the entire function for fns inside that are tail-recursive without calling recur.

This test could use some improvement.  The major place that it can be
improved is in checking to see if the arity of the recursive call is
the same as the arity of the function being defined.
@frenchy64
Copy link
Owner

Nice work :)

frenchy64 added a commit that referenced this pull request Jan 18, 2012
@frenchy64 frenchy64 merged commit 62e4d49 into frenchy64:master Jan 18, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants