Skip to content

Commit

Permalink
Committing meetup4 collab-2016-05 solutions.
Browse files Browse the repository at this point in the history
  • Loading branch information
snh-clj collab committed May 26, 2016
1 parent 9489406 commit 8c0de64
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions collab-2016-05/meetup4/src/ecapseman/core.clj
Expand Up @@ -10,7 +10,14 @@
Restriction: range"
[x y]
::no-implementation)
(reverse
(loop [working-list (list)
current-value x]
(if (>= current-value y)
working-list
(recur
(cons current-value working-list)
(inc current-value))))))

(defn four-clojure-29
"https://www.4clojure.com/problem/29 -- Get the Caps
Expand All @@ -20,7 +27,14 @@
Write a function which takes a string and returns a new string containing only the capital letters."
[s]
::no-implementation)
(apply str (re-seq #"[A-Z]" s)))

(defn anagrams
[words word-to-match]
(set
(filter
#(= (sort word-to-match) (sort %))
words)))

(defn four-clojure-77
"https://www.4clojure.com/problem/77 -- Anagram Finder
Expand All @@ -35,7 +49,10 @@
words. Words without any anagrams should not be included in the
result."
[words]
::no-implementation)
(set
(filter
(fn [i] (> (count i) 1))
(map (partial anagrams words) words))))

(defn project-euler-4-prep
"Write a predicate function that takes a number and returns a truthy
Expand Down

0 comments on commit 8c0de64

Please sign in to comment.