I'm reading Clojure Programming from O'Reilly. (defn a [b] (+ 5 b)) ;= #'user/a (def b (partial a 5)) ;= #'user/b (b) ;= 10 (defn a [b] (+ 10 b)) ;= #'user/a (b) ;= 10
Redefining a has no effect. But, (defn foo [] 1) ;= #'user/foo (defn bar [] (foo)) ;= #'user/bar (bar) ;= 1 (defn foo [] 2) ;= #'user/foo (bar) ;= 2 Shouldn't this also be the same? Why does (bar) evaluates 2 instead of 1 this time? -- 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