This comment is reply for 771 rubikitch: 再帰つらい…orz(逆順になるあみだくじ). Go to thread root.
shiro #779(2007/07/13 19:55 GMT) [ Scheme ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
(use srfi-42) (define (bars n) (define lim (- (* 2 n) 1)) (append-ec (: i 1 lim) (: j (if (odd? i) 1 2) (+ i 1) 2) (if (<= (+ i j) lim) `((,i . ,j)) '()))) (define (draw n bars) (do-ec (: i (- (* 2 n) 1)) (: j 1 (+ n 1)) (format #t "|~a" (cond [(= j n) "\n"] [(member (cons i j) bars) "-"] [else " "]))) ) (define (amida n) (draw n (bars n)))
Rating0/0=0.00-0+
[ reply ]
shiro
#779()
[
Scheme
]
Rating0/0=0.00
Rating0/0=0.00-0+