<commit_before>(ns mazes-clj.core)

(defn make-cell
  [row column rows columns]
  {:type  :Cell
   :coord [row column]
   :north (when (> row 0) [(dec row) column])
   :south (when (< row (dec rows)) [(inc row) column])
   :west  (when (> column 0) [row (dec column)])
   :links #{}})

(defn make-grid
  "Creates and returns a new grid with the specified row and column sizes."
  [rows columns]
  {:type    :Grid
   :rows    rows
   :columns columns
   :cells   (into [] (for [row (range rows) column (range columns)]
                       (make-cell row column rows columns)))})

(defn cell-index
  ([grid [row column]] (cell-index grid row column))
  ([grid row column] (+ (* row (:columns grid)) column)))<commit_msg>Replaced a line that was somehow accidentally deleted.<commit_after>(ns mazes-clj.core)

(defn make-cell
  [row column rows columns]
  {:type  :Cell
   :coord [row column]
   :north (when (> row 0) [(dec row) column])
   :south (when (< row (dec rows)) [(inc row) column])
   :east  (when (< column (dec columns)) [row (inc column)])
   :west  (when (> column 0) [row (dec column)])
   :links #{}})

(defn make-grid
  "Creates and returns a new grid with the specified row and column sizes."
  [rows columns]
  {:type    :Grid
   :rows    rows
   :columns columns
   :cells   (into [] (for [row (range rows) column (range columns)]
                       (make-cell row column rows columns)))})

(defn cell-index
  ([grid [row column]] (cell-index grid row column))
  ([grid row column] (+ (* row (:columns grid)) column)))
{'fraction_non_alphanumeric': 0.15090673575129535, 'fraction_numerical': 0.0025906735751295338, 'mean_word_length': 3.109042553191489, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, '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': '1840684', 'n_tokens_mistral': 523, 'n_tokens_neox': 492, 'n_words': 192}