<commit_before>; :mode=clojure:

(def zero (fn [f] (fn [x] x)))

(defn add-1 [n]
    (fn [f] (fn [x] (f ((n f) x)))))

(defn one [f] (fn [x] (f x)))

(defn two [f] (fn [x] (f (f x))))

(println
    (((add-1 (add-1 (add-1 (add-1 zero)))) inc) 0)
    ((one inc) 0)
    ((two inc) 0))
<commit_msg>Added 'add' without repeated application of 'add-1'.<commit_after>; :mode=clojure:

; Church numerals

(def zero (fn [f] (fn [x] x)))

(defn add-1 [n]
    (fn [f] (fn [x] (f ((n f) x)))))

(defn one [f] (fn [x] (f x)))

(defn two [f] (fn [x] (f (f x))))

(defn add [a b]
    (fn [f] (fn [x] ((a f) ((b f) x)))))

(println
    (((add-1 (add-1 (add-1 (add-1 zero)))) inc) 0)
    ((one inc) 0)
    ((two inc) 0)
    (((add one two) inc) 0)
    (((add (add-1 (add-1 (add-1 zero))) (add-1 (add-1 zero))) inc) 0))

{'fraction_non_alphanumeric': 0.27680798004987534, 'fraction_numerical': 0.029925187032418952, 'mean_word_length': 2.8421052631578947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1595972', 'n_tokens_mistral': 397, 'n_tokens_neox': 388, 'n_words': 134}