Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defparameter *stepdist* 367)
- (defparameter *buf* '(0))
- (rplacd *buf* *buf*)
- (defun insert! (l s n)
- (let ((c (nthcdr s l)))
- (rplacd c (cons n (cdr c)))
- (cdr c)))
- (defun fill! (l s lim)
- (loop for i from 1 to lim
- do (setf l (insert! l s i)))
- l)
- (defun find-after (l n)
- (if (eq (car l) n)
- (cadr l)
- (find-after (cdr l) n)))
- (format t "~a~%" (cadr (fill! *buf* *stepdist* 2017)))
- (setf *buf* '(0))
- (rplacd *buf* *buf*)
- (format t "~a~%" (find-after (fill! *buf* *stepdist* 50000000) 0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement