---
title: "一个不错的Scheme IDE"
author: "alexcheng"
date: "2008-01-08T22:44:44Z"
tags: ["IDE", "Scheme"]
slug: "scheme-ide"
draft: false
lastmod: "2008-01-08T22:44:44Z"
id: 154170
url: "https://woodstudio.iteye.com/blog/154170"
---

PLT Scheme，一个不错的IDE，至少比MIT/GNU的好用。

 

地址：[http://www.plt-scheme.org/](http://www.plt-scheme.org/)

 

更多的实现可以在[http://community.schemewiki.org/?scheme-faq-standards#implementations](http://community.schemewiki.org/?scheme-faq-standards#implementations)上找到。

 

顺手抄一个在Log(n)的时间内算Fibonacci数列的方法：

 

```
(define (fib n)
  (fib-iter 1 0 0 1 n))
(define (fib-iter a b p q count)
  (cond ((= count 0) b)
        ((even? count)
         (fib-iter a
                   b
                   (+ (* p p) (* q q))
                   (+ (* q q) (* 2 (* p q)))
                   (/ count 2)))
        (else (fib-iter (+ (* b q) (* a q) (* a p))
                        (+ (* b p) (* a q))
                        p
                        q
                        (- count 1)))))
(define (even? n)
  (= (remainder n 2) 0))

(fib 50)
(fib 100)
```