Comment detail
与えられた文字列でピラミッド (Nested Flatten)文字列のインデックスアクセスも算術演算も明示的ループも無しで。
1 2 3 4 5 6 | (use util.list)
(define (pyramid s)
(let r ((s (string->list s)) (p '()))
(unless (null? s)
(r (cdr s) (cons #\ p))
(apply print (append p (intersperse #\ s))))))
|
名前付きletは明示的loopじゃないと?:)
名前付けてるだけだも〜ん。
それにいわゆる「ループとしての使いかた」はしてないし。
Never mind ! :)





rubikitch
#2583()
[
Scheme
]
Rating0/0=0.00
Rating0/0=0.00-0+
1 reply [ reply ]