Skip to content

Add list ops exercise #225

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

Merged
merged 14 commits into from
Nov 1, 2022
Merged

Conversation

fapdash
Copy link
Contributor

@fapdash fapdash commented Oct 16, 2022

  • as noted in the problem-specification that some tracks would do that, I added a namespace to avoid conflicts with existing functions (since users will often evaluate function definitions inside of emacs they would otherwise overwrite built-in functions in their running environment)
  • I've added two additional functions:
    • list-sum: this is just to drive the point home that you can implement functions like that very easily through the primitives implemented in this exercise
    • list-empty-p: I hope to bring people towards the realization that nil = empty list in Emacs Lisp, checking if the car and cdr of a list are nil will not work.

Regarding list-empty-p we had this discussion on slack: https://app.slack.com/client/TAN6QMALR/CAQP7JL3T/thread/CAQP7JL3T-1665705236.652139
I think there should eventually b a learning / concept exercise that explains (equal nil '()) but for now it's better to have it in this exercise than not have it at all.

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of tiny nits

@fapdash fapdash force-pushed the add-list-ops-exercise branch from 77ee6b2 to 4026492 Compare October 19, 2022 10:49
@fapdash
Copy link
Contributor Author

fapdash commented Oct 19, 2022

@ErikSchierboom Thank you for reviewing :)

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny nit

Comment on lines 6 to 8
## Hints

The `fold-left` and `fold-right` methods are "fold" functions, which is a concept from the functional programming world. See the Wikipedia page on folding for [general background](https://en.wikipedia.org/wiki/Fold_(higher-order_function)) and [signature/implementation hints](https://en.wikipedia.org/wiki/Fold_(higher-order_function)#Linear_folds).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should go into a separate hints.md file (see https://github.com/exercism/elixir/blob/main/exercises/practice/strain/.docs/hints.md for an example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this? 86291ac

@ErikSchierboom ErikSchierboom merged commit b171561 into exercism:main Nov 1, 2022
@ErikSchierboom
Copy link
Member

@fapdash You've been doing a stellar job on the emacs-lisp track. Would you be interested in becoming a maintainer? If so, please send an email to jonathan at exercism.org. He's our community manager and will sort you out.

@fapdash
Copy link
Contributor Author

fapdash commented Nov 1, 2022

@ErikSchierboom Thank you! I'm interested, I'll send Jonathan an email. :)

@fapdash fapdash deleted the add-list-ops-exercise branch November 1, 2022 15:32
berquist added a commit to berquist/exercism-track-emacs-lisp that referenced this pull request Nov 9, 2022
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

Successfully merging this pull request may close these issues.

2 participants