diff --git a/csv/transform.scm b/csv/transform.scm index 7a8e519..500fdb0 100644 --- a/csv/transform.scm +++ b/csv/transform.scm @@ -33,7 +33,8 @@ ;; (pre-post-order $tree `(,(bubble-term rec "key-name") ;; (*default* . ,(lambda x x)))) ;; This will generate a rule which travels in *preorder* to each record named -;;'rec' and replace the rec symbol with the pair keyed as "key-name" +;;'rec' and replace the rec symbol with the pair keyed as "key-name". The rest +;;of the record will be a quoted list. (define-syntax bubble-term (syntax-rules () ((_ record-sym $str) @@ -42,4 +43,4 @@ (let* (($lst (cadr $record))) (receive (head rest) (partition (key-contains-defer $str) $lst) - (cons head (cons rest '()))))))))) + (cons head `(',rest)))))))))