Skip to content
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

Add a take/2 task #1

Open
gausby opened this issue Oct 22, 2015 · 0 comments
Open

Add a take/2 task #1

gausby opened this issue Oct 22, 2015 · 0 comments

Comments

@gausby
Copy link
Contributor

gausby commented Oct 22, 2015

If we do this workshop again we should consider adding a take/2 task to the assignments.

All groups ended up having two accumulators in their solution, because all the previous assignments up until chunk/2 could be solved using accumulators. Only one group had an alternative solution that used a take/2 helper function.

Learning how to juggle two accumulators are good, but I guess learning how to opt for a helper for some of the heavy lifting is a good lesson too. Just look at this diff: gausby@bd454b9

Question is though; should the take/2 assignment come before the chunk/2 assignment, or should it come earlier as it is rather "easy"1 to implement? The former would make it obvious that it can help solving chunk, the latter would hide it a bit, letting the student think a bit before reaching for take/2.


1 "easy" to implement compared to the other functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant