Guest User

Untitled

a guest
Jun 13th, 2020
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.31 KB | None | 0 0
  1. (let ((db (make-hash-table :test #'equal)))
  2.   (defun get-db (key) (gethash key db))
  3.   (defun put-db (key val) (setf (gethash key db) val))
  4.   (defun return-db () db)
  5.   (defun peek-db ()
  6.     (loop for k being the hash-keys in db using (hash-value v)
  7.        do (print k)))
  8.   (defun clear-db () (clrhash db)))
Advertisement
Add Comment
Please, Sign In to add comment