From 1f0a4f7b064c7bac16ee08dca2a0ac627f2fb9d9 Mon Sep 17 00:00:00 2001 From: Ed Langley Date: Mon, 29 Apr 2019 23:13:08 -0700 Subject: [PATCH] Remove implicit dependencies --- lens.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lens.lisp b/lens.lisp index 785d29d..843f3f8 100644 --- a/lens.lisp +++ b/lens.lisp @@ -182,9 +182,10 @@ contain the new value at the location focused by the lens." (lambda (cb) (lambda (old-hash) (fmap (lambda (new) - (fw.lu:prog1-bind (new-hash (alexandria:copy-hash-table old-hash)) - (setf (gethash key new-hash) - new))) + (let ((new-hash (alexandria:copy-hash-table old-hash))) + (prog1 new-hash + (setf (gethash key new-hash) + new)))) (funcall cb (gethash key old-hash)))))) ;; imagine a lens here that uses the MOP to immutably update a class... @@ -498,6 +499,7 @@ contain the new value at the location focused by the lens." it (alexandria:iota it-length)))))))) +#+nil (defmacro <> (arity &rest funs) (let ((arg-syms (loop repeat arity collect (gensym)))) `(lambda (,@arg-syms) @@ -510,4 +512,4 @@ contain the new value at the location focused by the lens." arg-syms)))) (defmacro <>1 (&rest funs) - `(<> 1 ,@funs)) + `(alexandria:compose ,@funs))