<commit_before>(ns io.cogitat.boot
  (:require [tailrecursion.boot.core :refer [deftask]]))


(deftask foo
  "A simple task to show the basic form; simply prints a message."
  [boot]
  (print 
  (fn [continue]
    (fn [event]
      (println "Hello, boot!")
      (continue event))))<commit_msg>Added a bunch of boot examples.<commit_after>(ns io.cogitat.boot
  (:require [tailrecursion.boot.core :refer [deftask]]))


(defn print-message
  ([]
    (println "Hello, boot!"))
  ([msg args]
    (print-message)
    (println msg)
    (println args)))

(deftask foo
  "A simple task with no args to show the basic form; simply prints a message.

  Called as:
      $ boot foo
  "
  [boot]
  (fn [continue]
    (fn [event]
      (print-message)
      (continue event))))

(deftask bar
  "A simple task with one required arg; prints message with the arg.

  Called as:
      $ boot [bar wib]
  "
  [boot arg]
  (fn [continue]
    (fn [event]
      (print-message "Here is your one arg:" arg)
      (continue event))))

(deftask baz
  "A simple task with one optional arg; prints message, and optional arg.

  Called as:
      $ boot [baz wib]
      $ boot baz
  "
  [boot & [arg]]
  (fn [continue]
    (fn [event]
      (print-message "Here is your one arg:" arg)
      (continue event))))

(deftask qux
  "A simple task with two args; prints message with args.

  Called as:
      $ boot [qux wib wob]
  "
  [boot arg1 arg2]
  (fn [continue]
    (fn [event]
      (print-message "Here are your two args:" [arg1 arg2])
      (continue event))))

(deftask quux
  "A simple task with multiple args; prints message with args.

  Called as:
      $ boot [quux wib wob wab]
      $ boot [quux wib wob]
      $ boot [quux wib]
      $ boot quux
  "
  [boot & args]
  (fn [continue]
    (fn [event]
      (print-message "Here are your args:" args)
      (continue event))))

(deftask corge
  "A simple task with two named args; prints message with arg values.

  Called as:
    $ boot [corge :foo wib :bar wob]
    $ boot [corge :foo wib]
    $ boot [corge :bar wob]
  "
  [boot & {:keys [foo bar]}]
  (fn [continue]
    (fn [event]
      (print-message "Here are your two named args:" [foo bar])
      (continue event))))

(deftask grault
  "A simple task with two named args; prints message with arg values.

  Called as:
    $ boot [grault qux :foo quux :bar corge
    $ boot [grault qux :foo quux]
    $ boot [grault qux]
  "
  [boot arg & {:keys [foo bar] :or {:foo "baz"}}]
  (fn [continue]
    (fn [event]
      (print-message "Here is your arg:" arg)
      (println "Here are your named args:")
      (println [foo bar])
      (continue event))))
{'fraction_non_alphanumeric': 0.12765151515151515, 'fraction_numerical': 0.0015151515151515152, 'mean_word_length': 2.617808219178082, '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': '4093006', 'n_tokens_mistral': 938, 'n_tokens_neox': 917, 'n_words': 338}