-
Notifications
You must be signed in to change notification settings - Fork 5.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
Added Elisp version of the kata #572
Conversation
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.
Please see review comments.
elisp/gilded-rose-test.el
Outdated
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.
Please make this test similar to other sample tests, e.g. https://github.com/emilybache/GildedRose-Refactoring-Kata/blob/main/clojure/test/gilded/core_test.clj
i.e. check that the name of "foo" is not "fixme".
elisp/gilded-rose.el
Outdated
|
||
(defun update-quality (item) | ||
"Update the quality of the ITEM according to the Gilded Rose rules." | ||
(let ((quality (item-quality item)) |
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.
the lets are already a simplification/improvement of the original code. Is it possible to access the value from the struct each time?
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.
Thank you. This was the simplest way I could represent the problem with the elisp I know. I'll have a look at getting the value from the struct each time
- Initial test modified to be similar to Clojure version - update-quality modified to read from make-item directly. Helper methods removed
For future there is no need to create a new pr. New commits appear in the pr automatically. Continues in #574 |
READ ME BEFORE SUBMITTING A PR
Please do not submit a PR with your solution to the Gilded Rose Kata. This repo is intended to be used as a starting point for the kata.
Please provide your PR description below this line
Added elisp version of the kata. PR contains source code, test file with one failing test and readme file