Guest User

Untitled

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