mirror of
https://github.com/fiddlerwoaroof/data-lens.git
synced 2025-11-08 18:26:32 +00:00
Remove implicit dependencies
This commit is contained in:
10
lens.lisp
10
lens.lisp
@ -182,9 +182,10 @@ contain the new value at the location focused by the lens."
|
|||||||
(lambda (cb)
|
(lambda (cb)
|
||||||
(lambda (old-hash)
|
(lambda (old-hash)
|
||||||
(fmap (lambda (new)
|
(fmap (lambda (new)
|
||||||
(fw.lu:prog1-bind (new-hash (alexandria:copy-hash-table old-hash))
|
(let ((new-hash (alexandria:copy-hash-table old-hash)))
|
||||||
(setf (gethash key new-hash)
|
(prog1 new-hash
|
||||||
new)))
|
(setf (gethash key new-hash)
|
||||||
|
new))))
|
||||||
(funcall cb (gethash key old-hash))))))
|
(funcall cb (gethash key old-hash))))))
|
||||||
|
|
||||||
;; imagine a lens here that uses the MOP to immutably update a class...
|
;; 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
|
it
|
||||||
(alexandria:iota it-length))))))))
|
(alexandria:iota it-length))))))))
|
||||||
|
|
||||||
|
#+nil
|
||||||
(defmacro <> (arity &rest funs)
|
(defmacro <> (arity &rest funs)
|
||||||
(let ((arg-syms (loop repeat arity collect (gensym))))
|
(let ((arg-syms (loop repeat arity collect (gensym))))
|
||||||
`(lambda (,@arg-syms)
|
`(lambda (,@arg-syms)
|
||||||
@ -510,4 +512,4 @@ contain the new value at the location focused by the lens."
|
|||||||
arg-syms))))
|
arg-syms))))
|
||||||
|
|
||||||
(defmacro <>1 (&rest funs)
|
(defmacro <>1 (&rest funs)
|
||||||
`(<> 1 ,@funs))
|
`(alexandria:compose ,@funs))
|
||||||
|
|||||||
Reference in New Issue
Block a user