From 4bfd27420631ef2f4c9462f9be1bff0147659703 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 18 Oct 2025 09:05:00 +0300 Subject: Remove unused functions from hash-tables --- src/hash-tables.lisp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src') diff --git a/src/hash-tables.lisp b/src/hash-tables.lisp index 84ffbfe..4290387 100644 --- a/src/hash-tables.lisp +++ b/src/hash-tables.lisp @@ -4,18 +4,9 @@ (:documentation "Hash-table-oriented utilities.") (:use :c2cl) (:import-from :alexandria :with-gensyms) - (:export :alist->hash-table :gethash-lazy :plist->hash-table)) + (:export :gethash-lazy)) (in-package :ukkoclot/hash-tables) -(defun alist->hash-table (alist &rest args &key &allow-other-keys) - "Turn an association list into a hash table. - -All key arguments are passed on to `make-hash-table'." - (let ((ht (apply #'make-hash-table args))) - (loop for (key . value) in alist do - (setf (gethash key ht) value)) - ht)) - (defmacro gethash-lazy (key hash-table default-lazy) "`gethash' alternative with lazily evaluated default value." (with-gensyms (res unique) @@ -24,12 +15,3 @@ All key arguments are passed on to `make-hash-table'." (if (eq ,res ,unique) ,default-lazy ,res)))) - -(defun plist->hash-table (plist &rest args &key &allow-other-keys) - "Turn a property list into a hash table. - -All key arguments are passed on to `make-hash-table'." - (let ((ht (apply #'make-hash-table args))) - (loop for (key value) on plist by #'cddr do - (setf (gethash key ht) value)) - ht)) -- cgit v1.2.3