On Sunday, October 30, 2016 at 10:50:08 PM UTC-4, Mikera wrote:
>
>
> I actually prefer the following style to both of the above:
>
> (defn camel->keyword*
> [s]
> (let [words (str/split s #"(?<=[a-z])(?=[A-Z])")
>lc-words (map str/lower-case words)
>
On Thursday, October 27, 2016 at 6:24:19 PM UTC-4, Marek Kubica wrote:
>
>
> But that is rather verbose and naming the `coll` argument is kinda
> pointless, so you can simplify it to
>
> #(map str/lower-case %)
>
> And as you see, have a function which calls a function (`map`) with
> the firs
Thanks, everyone, your responses are very helpful and much appreciated.
On Thu 10/27/16 09:57AM, lvh wrote:
> comp takes a number of functions and returns a function. Threading macros
take a
> number of forms (expressions) and return an expression. The threading
macro does
> not need a partial,
I have some confusion about how the function `comp` works, especially as
compared to the threading macro `->>`.
>From the book *Clojure Programming* (pages 70-71 of Chapter 2: Functional
Programming), the following two functions are described as functionally
equivalent:
(def camel->keyword