-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New Concept]: Recursion #3051
[New Concept]: Recursion #3051
Conversation
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bobahop I am sorry this took so long to review today. My sincere apologies. I am a bit conflicted around this as it stands. On one hand, this is very succinct, and has good links and solid examples. On the other hand, many of our current concept docs dive in a bit deeper/have more examples and explanation. loops as an example.
Now, I am of the opinion that our current concept docs are too "wordy" - and need to be trimmed down a bit. ..but it was hard for me reading through this not to dive in and add a comparison example between iteration and recursion, or diagrams or an interactive example. I keep thinking that this doc makes perfect sense for someone who's already had passing exposure, but wouldn't quite get a new-to-recursion person over the hump. Not that this is a particularly great article, but this hacker noon post does that a bit.
And at the same time, I am thinking that this doc doesn't have enough strategies (like generators and lru.cache and memoizaton and indirect recursion) for working with recursion in Python -- and that for a more advanced student, it would be great to have 4-5 clear tradeoffs for why or why you wouldn't recurse.
But I may also be overthinking it. I do have a horrible tendency to want to go into all the things.
So these are suggestions, and you can tell me to take I hike. 😄 In the spirit of optimistic merging, we can make the necessary code changes and then interate on it/add things to it longer-term as well. The request change is around formatting the code example - the rest is optional.
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
All suggestions committed. Still more to be done re examples and perhaps some expanded explanation. |
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Rearranged as per our Stack discussion.
Added in for points 7, 9, 11, and 12 of our stack discussion. For point 10, I think I'd prefer just adding links to links.json, as I don't feel comfortable introducing those concepts into the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a few changes. But I also think that this is more or less good to go. 😄 We could put in a few diagrams in the section going over recursion vs looping (I am happy to do those - just let me know) - but that might also make this "too much". Let me know your thoughts on that.
@bobahop -- this is showing merge conflicts, so I will try to fix those today so it can be merged when you are happy with it. |
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
@BethanyG I fetched from upstream to the branch so the merge conflicts have hopefully gone away now. |
@bobahop - It looks like a rebase won't work, but a squash will. I don't pretend to know why. If you're happy with this, I'm happy -- so please feel free to merge it (select "squash and merge" in the drop-down). 😄 |
No description provided.