From b4304ae4735a67d9c82221bebb0d2d79c6597d2d Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Thu, 16 Apr 2020 02:02:29 -0500 Subject: [PATCH] Use `cl-labels` in one place * jupyter-rest-api.el (jupyter-api-get-ordered-checkpoints): Do it. --- jupyter-rest-api.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jupyter-rest-api.el b/jupyter-rest-api.el index c87824a..17a25b8 100644 --- a/jupyter-rest-api.el +++ b/jupyter-rest-api.el @@ -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.