Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c0b4bb49ef
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (11 sloc) 0.379 kb
(define (map proc lst)
(if (null? lst)
'()
(cons (proc (car lst)) (map proc (cdr lst)))))
(define (filter proc lst)
(cond
((null? lst) '())
((proc (car lst)) (cons (car lst) (filter proc (cdr lst))))
(else (filter proc (cdr lst)))))
(write (map (lambda (x) (* x x)) '(1 2 3 4)))
(write (filter (lambda (x) (> x 2)) '(1 2 3 4)))
Jump to Line
Something went wrong with that request. Please try again.