Lindsey Kuper (lindseykuper) wrote,
Lindsey Kuper
lindseykuper

I schemed up a birthday gift for you, but it's open to interpretation

(define jes
(lambda ls
(letrec ((inc (lambda (n) (+ n 1)))
(sum (lambda (ls)
(if (null? ls)
0
(+ (car ls) (sum (cdr ls)))))))
(+ (car ls) (sum (map inc (cdr ls)))))))

(jes 5 1 9 9)

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 9 comments