Skip to content

Commit

Permalink
update example solution
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Jan 17, 2025
1 parent b350cca commit aac526f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions exercises/practice/acronym/.meta/example.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(ns acronym
(:require [clojure.string :as str]))
(ns acronym)

(defn acronym [text]
(->> (re-seq #"[A-Z]+[a-z]*|[a-z]+" text)
(->> (re-seq #"(?<=^|[-_ ])[A-Za-z]" text)
(map first)
(apply str)
str/upper-case))
clojure.string/upper-case))

0 comments on commit aac526f

Please sign in to comment.