2010-04-01から1ヶ月間の記事一覧

lazy-sequenceって重要ですね><

http://d.hatena.ne.jp/kencoba/20100405/1270433351 速度が全然違う>< (defn move [a b] ['move a 'to b]) (defn hanoi [a b c n] (if (< n 1) nil (if (= n 1) (list (move a c)) (concat (hanoi a c b (- n 1)) (cons (move a c) (hanoi b a c (- n 1))…

そういえばOnLispに!ってマクロありましたね。

schemeだとfuncallが要らなくなるので綺麗になると書かれていたけれど…使い道が思いつかない。 (define-module onlisp-macros (use srfi-1) ;filter (module-exports !)) (select-module onlisp-macros) (define *!-table* (make-hash-table)) (define-macro…