On Fri, 22 Oct 2010 03:48:44 -0700 (PDT)
Marc von Bihl wrote:
> Hello, I am new to fucntional programming and have 2 questions:
>
> How can I apply a function to each element from a list and a second
> parameter?
>
> (def lstr '("Hello1" "Hello2" "Hello3"))
>
> (defn addtoString [s1 s2]
> (s
you could do something like:
(map str ["hello1" "hello2" "hello3"] (repeat "world"))
there is also a time macro:
(time (println "oh hi"))
On Fri, Oct 22, 2010 at 5:48 AM, Marc von Bihl wrote:
> Hello, I am new to fucntional programming and have 2 questions:
>
> How can I apply a function to e
Hello, I am new to fucntional programming and have 2 questions:
How can I apply a function to each element from a list and a second
parameter?
(def lstr '("Hello1" "Hello2" "Hello3"))
(defn addtoString [s1 s2]
(str s1 s2))
(apply (addtoString lstr "World"))
-
I need it for the follo