<commit_before>; tré – Copyright (c) 2006–2015 <NAME> <<EMAIL>>

(defun quote-expand (x)
  (with (atomic [? (constant-literal? _)
                   _
                   `(quote ,_)]
         quot   [? (atom _)
                   (atomic _)
                   `(. ,(quot _.)
                       ,(quot ._))]
         qq     [? (any-quasiquote? (cadr _.))
                   `(. ,(conv (cadr _.))
                       ,(conv ._))
                   `(. ,(cadr _.)
                       ,(conv ._))]
         qs     [? (any-quasiquote? (cadr _.))
                   (error "Illegal ~A as argument to ,@ (QUASIQUOTE-SPLICE)."
                          (cadr _.))
                   `(append ,(cadr _.) ,(conv ._))]
         conv   [?
                  (atom _)                (atomic _)
                  (atom _.)               `(. ,(atomic _.)
                                              ,(conv ._))
                  (quasiquote? _.)        (qq _)
                  (quasiquote-splice? _.) (qs _)
                  `(. ,(conv _.)
                      ,(conv ._))])
    (tree-walk x
               :ascending [?
                            (quote? _)     (quot ._.)
                            (backquote? _) (conv ._.)
                            _])))<commit_msg>Improved tangibility.<commit_after>; tré – Copyright (c) 2006–2015 <NAME> <<EMAIL>>

(defun quote-expand (x)
  (with (atomic [? (constant-literal? _)
                   _
                   `(quote ,_)]
         static [? (atom _)
                   (atomic _)
                   `(. ,(static _.)
                       ,(static ._))]
         qq     [? (any-quasiquote? (cadr _.))
                   `(. ,(backq (cadr _.))
                       ,(backq ._))
                   `(. ,(cadr _.)
                       ,(backq ._))]
         qqs    [? (any-quasiquote? (cadr _.))
                   (error "Illegal ~A as argument to ,@ (QUASIQUOTE-SPLICE)."
                          (cadr _.))
                   `(append ,(cadr _.) ,(backq ._))]
         backq  [?
                  (atom _)                (atomic _)
                  (atom _.)               `(. ,(atomic _.)
                                              ,(backq ._))
                  (quasiquote? _.)        (qq _)
                  (quasiquote-splice? _.) (qqs _)
                  `(. ,(backq _.)
                      ,(backq ._))]
         disp   [?
                  (quote? _)     (static ._.)
                  (backquote? _) (backq ._.)
                  _])
    (tree-walk x :ascending #'disp)))
{'fraction_non_alphanumeric': 0.1519434628975265, 'fraction_numerical': 0.006281900274833137, 'mean_word_length': 0.7657657657657657, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6713938', 'n_tokens_mistral': 807, 'n_tokens_neox': 727, 'n_words': 125}