4 ms·
Indeed: here are two of the original functions. (defun lsb (n i) (cond ((eq n 0) i) (T (lsb (logand (- n 1) n) (+ i 1)))
by erdos2 19y ago
Indeed: here are two of the original functions.
(defun lsb (n i)
(cond
((eq n 0) i)
(T (lsb (logand (- n 1) n) (+ i 1)))
)
)
(defun bits (n) (lsb n 0))
CL-USER (bits #B101100101101001010101101001010101001001111)
22