fork download
  1. (define clean-list
  2. (lambda (x)
  3. (list x (test x))))
  4.  
  5. (define test
  6. (lambda (x)
  7. (cond ((eq? x '()) '())
  8. ((= 0 (modulo (car x) 2))
  9. (cons (car x) (test(cdr x))))
  10. (else (test(cdr x))))
  11. ))
  12.  
  13. (write (clean-list '(4 11 16 22 75 34)))
Success #stdin #stdout 0.03s 4176KB
stdin
Standard input is empty
stdout
((4 11 16 22 75 34) (4 16 22 34))