@@ 0,0 1,8 @@
+;; Public domain code. Or CC0 if your jurisdiction doesn't have the notion of PD.
+
+(define (flatten lst)
+ (let loop ((lst lst) (acc '()))
+ (cond
+ ((null? lst) acc)
+ ((pair? lst) (loop (car lst) (loop (cdr lst) acc)))
+ (else (cons lst acc)))))