Let Over Lambda

2020/10/29 00:33
阅读数 257

以下摘自LetOverlambda

  1. let over lambda (let ((counter 0)) (lambda (x) (1+ counter))
  2. lambda let over lambda (lambda () (let ((counter 0)) (lambda () (incf counter))))
  3. let over lambda over let over lambda (let ((direction 'up)) (defun toggle-counter-direction () (setq direction (if (eq direction 'up) 'down 'up))) (defun counter-class () (let ((counter 0)) (lambda () (if (eq direction 'up) (incf counter) (decf counter))))))
展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部