Skip to content

Commit

Permalink
Use cl-labels in one place
Browse files Browse the repository at this point in the history
* jupyter-rest-api.el (jupyter-api-get-ordered-checkpoints): Do it.
  • Loading branch information
nnicandro committed Apr 22, 2021
1 parent a6c40a4 commit b4304ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jupyter-rest-api.el
Original file line number Diff line number Diff line change
Expand Up @@ -991,10 +991,10 @@ Return a list of the checkpoints ordered most recently created first."
(declare (indent 1))
(sort
(jupyter-api-get-checkpoints client file)
(lambda (a b)
(let ((ta (jupyter-decode-time (plist-get a :last_modified)))
(tb (jupyter-decode-time (plist-get b :last_modified))))
(time-less-p tb ta)))))
(cl-labels ((decode-time
(a) (jupyter-decode-time (plist-get a :last_modified))))
(lambda (a b)
(time-less-p (decode-time b) (decode-time a))))))

(defun jupyter-api-get-latest-checkpoint (client file)
"Return the latest checkpoint for FILE on the server accessed by CLIENT.
Expand Down

0 comments on commit b4304ae

Please sign in to comment.