Why Nostr? What is Njump?
2024-11-17 02:51:00
in reply to

screwtape on Nostr: nprofile1q…657a8 Ugh, it's 10x slower than this loop facility one. (defun ...


Ugh, it's 10x slower than this loop facility one.
(defun loopfizz-of (no)
(let ((res (loop :repeat (1+ no)
:for x :from 0 :by 1 :for y := '0 :then y :for z := '0 :then z
:when (eql x y) :do (incf y 3)
:When (eql x z) :do (incf z 5)
:finally (return (list x (decf y 3) (decf z 5))))))
(cond ((and (= (car res) (cadr res)) (= (car res) (caddr res))) '(fizz buzz))
((= (car res) (cadr res)) '(fizz)) ((= (car res) (caddr res)) '(buzz))
(:otherwise (butlast res 2)))))
Author Public Key
npub1n6w9sqrgjr37x83sdcs9rrerd9jlrk8wjajqzawhftacsa5603xs8krzel