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

Clean up grade-school exercise #417

Merged
merged 4 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions exercises/practice/grade-school/.meta/example.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
(defun grade (school grade)
(gethash grade (school-roster school)))

(defun set-grade (school grade newval)
(puthash grade (sort newval #'string<) (school-roster school)))


(provide 'grade-school)
;;; grade-school.el ends here
7 changes: 4 additions & 3 deletions exercises/practice/grade-school/grade-school-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@


(load-file "grade-school.el")
(declare-function roster "grade-school.el" (students))
(declare-function add "grade-school.el" (students))
(declare-function grade "grade-school.el" (desired-grade students))
(declare-function make-school "grade-school.el")
(declare-function roster "grade-school.el" (school))
(declare-function add "grade-school.el" (school name grade))
(declare-function grade "grade-school.el" (school grade))


(ert-deftest roster-is-empty-when-no-student-is-added ()
Expand Down
8 changes: 5 additions & 3 deletions exercises/practice/grade-school/grade-school.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

;;; Code:

(defun make-school ()
(error "Delete this S-Expression and write your own implementation"))

(defun roster (students)
(defun roster (school)
(error "Delete this S-Expression and write your own implementation"))

(defun add (students)
(defun add (school name grade)
(error "Delete this S-Expression and write your own implementation"))

(defun grade (desired-grade students)
(defun grade (school grade)
(error "Delete this S-Expression and write your own implementation"))


Expand Down