Skip to content

Instantly share code, notes, and snippets.

View ApricotLace's full-sized avatar

Evgeny Mukha ApricotLace

  • Health-Samurai
  • Montenegro
View GitHub Profile
(ns bonch.core
  (:require [tilakone.core :as tk :refer [_]]
            [clojure.string :as str]))
(def state-schema
  [{::tk/name        :start
    ::tk/transitions [{::tk/on #"[\[\]\(\)\{\}]",  ::tk/actions [[[:add :paren]]]}
                      {::tk/on #"[^\[\]\(\)\{\}\d\s;:]+" ::tk/to :symbol? ::tk/actions [[[:stash]]]}
                      {::tk/on #"[\s,\n]" ::tk/actions [[[:add :delimiter]]]}
(ns future-atoms-task.core)
(defn filter-all-non-alphabet-chars
[text]
(clojure.string/join (filter (fn [char]
(or (Character/isWhitespace char) (Character/isLetter char)))
text)))
(defn count-words
[text]
;;3 | blank
;;3 | +
;;3 5 | +
;;3 5 | + *
;;3 5 10 | + *
;;3 (* 5 10) | + /
;;3 (* 5 10) 2 | + /
;;(+ 3 (/ (* 5 10) 2)) 3 | +
;;(+ (+ 3 (/ (* 5 10) 2)) 3)