Posted 2013-01-19 19:04:00 GMT
Sagittariusの0.4.1が出たらしいので早速インストール。
$ wget http://sagittarius-scheme.googlecode.com/files/sagittarius-0.4.1.tar.gz $ tar xvf sagittarius-0.4.1.tar.gz $ cd sagittarius-0.4.1/ $ cmake . $ make $ make test $ make doc $ make install
(import (srfi :42)
(match)
(sagittarius control))
(define (fib n)
(car (fold-ec '(1 0)
(: i 1 n)
#f
(match-lambda* ((_ (a b . rest))
(list (+ a b) a))))))
(fib 100)
;=> 354224848179261915075
Schemeも少しは書けるようになりたい…。