about summary refs log blame commit diff stats
path: root/js/games/nluqo.github.io/~bh/61a-pages/Lectures/3.5/stream0.scm
blob: d6f15da4ba625e6dc36c11dd238c71d50082533c (plain) (tree)
1
2
3
4
5
6





                                                         
(define (perfect? n)
  (define (iter i sum)
    (cond ((= i n) sum)
	  ((= 0 (remainder n i)) (iter (1+ i) (+ sum i)))
	  (else (iter (1+ i) sum)) ))
  (= n (iter 1 0)) )