Plaster
New
List
Login
common-lisp
default
anonymous
2022.07.13 20:32:59
(defclass my-client () ()) (defmethod eclector.reader:interpret-symbol ((client my-client) input-stream package-indicator symbol-name internp) (if (equal symbol-name "RED") (call-next-method client input-stream package-indicator (if (zerop (random 2)) "RED" "BLUE") internp) (call-next-method))) (defun test () (let ((eclector.reader:*client* (make-instance 'my-client))) (loop repeat 10 collect (eclector.reader:read-from-string "RED"))))
Raw
Annotate
Repaste
Edit