LISP Scheme Part3
■ このスレッドは過去ログ倉庫に格納されています
0020デフォルトの名無しさん
NGNGこういうmap関数を作ったとき、
(define (string-map proc s)
(let loop ((pos 0))
(if (< pos (string-length s))
(cons
(proc (string-ref s pos))
(loop (+ pos 1)))
tail)))
(string-map (lambda(c)(display c)#t) "abcdef")
fedcba
=>(#t #t #t #t #t #t)
という結果になってしまいました。
これは規格通りなのでしょうか?
ほんとは
abcdef
と出したいんですけど。
■ このスレッドは過去ログ倉庫に格納されています