Skip to content

Commit

Permalink
Minor change to utilities
Browse files Browse the repository at this point in the history
Found out about cl:identity so could remove my helper function.
  • Loading branch information
abraemer committed Dec 6, 2018
1 parent 9192073 commit d318227
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utilities.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
(loop :for key :being :the :hash-keys :of hashtable
:collect key))

(defun id (x) x)

(defun max-key (hashtable &key (test #'>) (accessor #'id))
(defun max-key (hashtable &key (test #'>) (accessor #'identity))
(let ((keys (hash-keys hashtable)))
(loop
:with max-key := (first keys)
Expand Down

0 comments on commit d318227

Please sign in to comment.