От: | Кодёнок | ||
Дата: | 16.06.05 10:32 | ||
Оценка: |
Scheme:
( define sum ( lambda ( from total ) ( if ( = 0 from ) total ( sum ( - from 1 ) ( + total from ) ) ) ) ) ( sum 10 0 )
(define sum
(lambda (from total)
(if (= 0 from)
total
(sum (- from 1) (+ total from)))))
(sum 10 0)
(define sum
(lambda (from total)
(if (= 0 from)
total
(sum (- from 1 ) (+ total from))
)
)
)
(sum 10 0)