<commit_before>(ns uxbox.util.lens
  (:refer-clojure :exclude [derive merge])
  (:require [cats.labs.lens :as l]))

(defn dep-in
  [where link]
  {:pre [(vector? where) (vector? link)]}
  (l/lens
   (fn [s]
     (let [value (get-in s link)
           path (conj where value)]
       (get-in s path)))
   (fn [s f]
     (throw (ex-info "Not implemented" {})))))

(defn getter
  [f]
  (l/lens f #(throw (ex-info "Not implemented" {}))))

(defn merge
  [data]
  (l/lens
   (fn [s] (cljs.core/merge s data))
   #(throw (ex-info "Not implemented" {}))))

(defn derive
  [a path]
  (l/focus-atom (l/in path) a))

(defn focus
  ([state]
   (l/focus-atom l/id state))
  ([lens state]
   (l/focus-atom lens state)))<commit_msg>Remove unused lenses related code from utils ns.<commit_after>(ns uxbox.util.lens
  (:refer-clojure :exclude [derive merge])
  (:require [cats.labs.lens :as l]))

(defn getter
  [f]
  (l/lens f #(throw (ex-info "Not implemented" {}))))

(defn merge
  [data]
  (l/lens
   (fn [s] (cljs.core/merge s data))
   #(throw (ex-info "Not implemented" {}))))
{'fraction_non_alphanumeric': 0.19400187441424555, 'fraction_numerical': 0.0, 'mean_word_length': 3.13953488372093, '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': '4379700', 'n_tokens_mistral': 448, 'n_tokens_neox': 430, 'n_words': 120}