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)))