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

(defbuiltin macro? (x) (cl:rassoc x *macros* :test #'eq))

(defvar *macroexpand-hook* nil)

(defbuiltin macroexpand-1 (x)
  (? *macroexpand-hook*
     (apply *macroexpand-hook* (list x))
     x))

(defun macroexpand-0 (old x)
  (? (equal x old)
     old
     (macroexpand x)))

(defbuiltin macroexpand (x)
  (macroexpand-0 x (macroexpand-1 x)))<commit_msg>Builtins %%MACRO? and %%MACROCALL added.<commit_after>; tré – Copyright (c) 2014 <NAME> <<EMAIL>>

(defbuiltin macro? (x) (cl:rassoc x *macros* :test #'eq))

(defbuiltin %%macrocall (x)
  (alet (cdr (assoc x. (symbol-value (make-symbol "*MACROS*" "TRE")) :test #'eq))
        (apply .! (cdrlist (argument-expand x. !. .x)))))

(defbuiltin %%macro? (x)
  (& (cons? x)
     (symbol? x.)
     (assoc x. (symbol-value (make-symbol "*MACROS*" "TRE")) :test #'eq)))

(defvar *macroexpand-hook* nil)

(defbuiltin macroexpand-1 (x)
  (? *macroexpand-hook*
     (apply *macroexpand-hook* (list x))
     x))

(defun macroexpand-0 (old x)
  (? (equal x old)
     old
     (macroexpand x)))

(defbuiltin macroexpand (x)
  (macroexpand-0 x (macroexpand-1 x)))
{'fraction_non_alphanumeric': 0.1927710843373494, 'fraction_numerical': 0.013769363166953529, 'mean_word_length': 3.727642276422764, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4261806', 'n_tokens_mistral': 481, 'n_tokens_neox': 459, 'n_words': 126}