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

Added Elisp version of the kata #572

Closed
wants to merge 4 commits into from
Closed

Conversation

MGadhvi
Copy link
Contributor

@MGadhvi MGadhvi commented Oct 6, 2024

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.

  • I acknowledge that this PR is not a solution to the Gilded Rose Kata, but an improvement to the template.
  • I acknowledge that I have read CONTRIBUTING.md

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

Copy link
Collaborator

@codecop codecop left a 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.

Copy link
Collaborator

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".


(defun update-quality (item)
"Update the quality of the ITEM according to the Gilded Rose rules."
(let ((quality (item-quality item))
Copy link
Collaborator

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?

Copy link
Contributor Author

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

elisp/gilded-rose.el Show resolved Hide resolved
- Initial test modified to be similar to Clojure version
- update-quality modified to read from make-item directly. Helper methods removed
@MGadhvi MGadhvi closed this Oct 7, 2024
@codecop
Copy link
Collaborator

codecop commented Oct 8, 2024

For future there is no need to create a new pr. New commits appear in the pr automatically. Continues in #574

@codecop codecop mentioned this pull request Oct 8, 2024
2 tasks
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