((fn [x] (* 5 x)) 5) is the same as
(def my-function (fn [x] (* 5 x))) (my-function 5) On Fri, Jan 2, 2015 at 8:13 PM, novato <biofob...@gmail.com> wrote: > I choose clojure as my first programming language after some research. I > am learning by doing Clojure Koans <http://clojurekoans.com/> exercises. > I reached to the functions "lesson" and I have a doubt on the following > code: > ((fn [x] (* 5 x)) 5) > > Why is that the last 5 is outside the fn parentheses? Why this doesn't > work? > (fn [x] (* 5 x) 5) > > Thanks in advice for the clarification and excuse my poor english. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.