es #1790(2007/08/03 14:53 GMT) [ Scheme ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
(use text.tree) (use util.list) (define (positive->kansuji n) (define (keta-split n keta) (receive (q r) (quotient&remainder n keta) (if (< q keta) (if (zero? q) (list r) (list r q)) (cons r (keta-split q keta))))) (define (add-tanni lst tanni) (fold (lambda (x t l) (cons (list (cond ((and (equal? 1 x) (not (equal? t ""))) "") ((integer? x) (list-ref '("" "一" "二" "三" "四" "五" "六" "七" "八" "九") x)) (else x)) (if (and (equal? 0 x) (not (equal? t ""))) "" t)) l)) '() lst tanni)) (tree->string (intersperse " " (add-tanni (map (lambda (n) (add-tanni (keta-split n 10) '("" "十" "百" "千"))) (keta-split n 10000)) '("" "万" "億" "兆")))))
Rating0/0=0.00-0+
[ reply ]
es
#1790()
[
Scheme
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]