+(defun repr-weak-key-hash-table (index &optional (value nil value-p))
+ (let ((first (+ most-positive-fixnum (mod (* index 31) 9)))
+ (n 5))
+ (if value-p
+ (and (hash-table-p value)
+ (<= (hash-table-count value) n)
+ (dotimes (i n t)
+ (let ((x (gethash (+ i first) value)))
+ (unless (or (null x) (= x i))
+ (return nil)))))
+ (let ((hash-table (make-hash-table
+ :weakness :key
+ :test (random-element '(eq eql equal equalp)))))
+ (dotimes (i n)
+ (setf (gethash (+ first i) hash-table) i))
+ hash-table))))
+