land-of-lisp-first-program

it2024-12-02  19

 

1 (defparameter *small* 1) 2 (defparameter *big* 100) 3 4 (defun guess-my-number () 5 (ash (+ *small* *big*) -1)) 6 7 (defun smaller () 8 (setf *big* (1- (guess-my-number))) 9 (guess-my-number)) 10 11 (defun bigger () 12 (setf *small* (1+ (guess-my-number))) 13 (guess-my-number)) 14 15 (defun start-over() 16 (defparameter *small* 1) 17 (defparameter *big* 100) 18 (guess-my-number))

 

转载于:https://www.cnblogs.com/tclan126/p/7347418.html

相关资源:数据结构—成绩单生成器
最新回复(0)