Hello David, what's the question ?
2011/1/5 David <dsieg...@yahoo.com> > Consider the two definitions: > > (defn if-let-good [str] > (if-let [rest (seq (drop-while (partial = \a) str))] > (first rest) > "empty")) > > (defn if-let-bad [seq] > (if-let [rest (seq (drop-while (partial = \a) seq))] > (first rest) > "empty")) > > The only difference between them is the name of the arg: "str" in the > good > definition, "seq" in the bad definition. > > (if-let-good "") > => "empty" > > (if-let-bad "") > > aborts with: > > java.lang.String cannot be cast to clojure.lang.IFn > [Thrown class java.lang.ClassCastException] > > -- > 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<clojure%2bunsubscr...@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 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