feat: add x-group

This commit is contained in:
Edward Langley
2023-10-22 11:16:36 -07:00
parent 989454fc28
commit 11c6fbe12d
2 changed files with 6 additions and 3 deletions

View File

@ -423,6 +423,11 @@
(reverse (cdr it))))
(alexandria:hash-table-alist groups)))))
(defun x-group (fn)
(lambda (groups)
(loop for (key . group) in groups
collect (funcall fn key group))))
(defun hash-join (probe join-fn &key (test 'eql) (key 'car))
(let* ((lookup (make-hash-table :test test :size (length probe)))
(lookup-fn (functionalize lookup)))

View File

@ -21,9 +21,7 @@
#:transform-elt #:denest #:op #:defalias #:<> #:<>1 #:== #:
#: #:suffixp #:functionalize #:inc #:group-by #:keys
#:conj #:disj #:delay #:of-type #:transform #:calling*
#:calling
#:hash-join
#:tap))
#:calling #:hash-join #:tap #:x-group))
(defpackage :data-lens.transducers.internals
(:use :cl)