2010/05/24

gauche with-module

前にメモっていますが、もう一度。
;; with-module
(define + 1)
+
; -> 1
(+ 1 2 3)
; -> *** ERROR: invalid application: (1 1 2 3)
(define + (with-module gauche +))
+
; -> #<subr +>
(+ 1 2 3)
; -> 6
view raw with-module.scm hosted with ❤ by GitHub


プログラミングGauche

0 件のコメント:

コメントを投稿