Advertisement
Guest User

Untitled

a guest
May 2nd, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.73 KB | None | 0 0
  1.  
  2. (defun makefilehash (zips)
  3.   (let ((h (make-hash-table :test 'equal)))
  4.     (iter (for f in zips)
  5.       (let ((year (getyear f))
  6.             (month (getmont f))
  7.             (symbol (getsymbol f))
  8.             (askbid (getaskbid f)))
  9.         (unless (gethash askbid h)
  10.           (setf (gethash askbid h) (make-hash-table :test 'equal)))
  11.         (unless (gethash symbol (gethash askbid h))
  12.           (setf (gethash symbol (gethash askbid h)) (make-hash-table :test 'equal)))
  13.         (unless (gethash year (gethash symbol (gethash askbid h)))
  14.           (setf (gethash year (gethash symbol (gethash askbid h))) (make-hash-table :test 'equal)))
  15.         (setf (gethash month (gethash year (gethash symbol (gethash askbid h)))) f)
  16.         h)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement