Skip to content

Instantly share code, notes, and snippets.

@haruyama
Created August 12, 2013 10:31
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 haruyama/6209777 to your computer and use it in GitHub Desktop.
Save haruyama/6209777 to your computer and use it in GitHub Desktop.
(define (fringe x)
(define (loop x acc)
(cond ((null? x) acc)
((not (pair? x)) (cons x acc))
(else (loop (car x) (loop (cdr x) acc)))))
(loop x '()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment