Lisp Scheme Part23
■ このスレッドは過去ログ倉庫に格納されています
0866デフォルトの名無しさん
2008/10/19(日) 14:17:19(count)
(count)
に対して
the number of times the counter has been used 1
the number of times the counter has been used 2
という出力を出したいのですが、私がコーディングしたSchemeでは
(the number of times the counter has been used . 1)
という風に出てしまいます。
以下がコードなのですが、どこをどういう風に変えれば良いか教えていただきたく思います。ビギナー的な内容で恐縮ですがよろしくお願いします。
(define next 0)
(define count
(lambda()
(set! next (+ next 1))
(append '(the number of times the counter has been used) next)))
(count)
(count)
■ このスレッドは過去ログ倉庫に格納されています