Skip to content

Instantly share code, notes, and snippets.

@rahulkmr
Created May 10, 2011 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulkmr/965170 to your computer and use it in GitHub Desktop.
Save rahulkmr/965170 to your computer and use it in GitHub Desktop.
#lang racket
(define (list-sum l k)
(if (null? l)
(k 0)
(list-sum (cdr l)
(lambda (s) (k (+ s (car l)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment