diff --git a/data-lens.asd b/data-lens.asd index 138aaf5..41212b3 100644 --- a/data-lens.asd +++ b/data-lens.asd @@ -1,5 +1,8 @@ (asdf:defsystem #:data-lens - :description "Utilities for building data transormations from composable functions, modeled on lenses and transducers" + :description #.(format nil "~a ~a ~a" + "Utilities for building data transormations from" + "composable functions, modeled on lenses and" + "transducers") :author "Edward Langley " :license "MIT" :depends-on (:cl-ppcre diff --git a/lens.lisp b/lens.lisp index 146f7d7..a79b31b 100644 --- a/lens.lisp +++ b/lens.lisp @@ -234,8 +234,9 @@ contain the new value at the location focused by the lens." #:compress-runs #:combine-matching-lists #:sorted #:applicable-when #:of-length #:of-min-length #:of-max-length #:transform-head #:maximizing #:zipping #:applying #:splice-elt #:transform-elt #:denest - #:op #:defalias #:<> #:<>1 - #:•)) + #:op #:defalias #:<> #:<>1 #:== #:• + )) + (in-package :data-lens) @@ -275,6 +276,10 @@ contain the new value at the location focused by the lens." when (equal key a-key) do (return (car value))))))) +(defun-ct == (target &key (test 'eql)) + (lambda (v) + (funcall test target v))) + (defun-ct deduplicate (&optional (test 'eql)) (lambda (it) (remove-duplicates it :test test)))