Skip to content

Instantly share code, notes, and snippets.

@g000001
Created July 27, 2013 17:04
Show Gist options
  • Save g000001/6095497 to your computer and use it in GitHub Desktop.
Save g000001/6095497 to your computer and use it in GitHub Desktop.
無限再帰を止める方法
;;; 無限再帰を止める方法
(def foo (n)
(prn n)
(cl:sleep 1)
(foo (+ 1 n)))
(foo 0)
;>>> 0
;>>> 1
...
;;; 再定義
(def foo (n))
;;; 止まる
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment