Re: if-let bug

2011-01-05 Thread David
Nevermind - it was late, and I found the error message cryptic. Sorry for throwing up a red herring. On Jan 5, 5:30 am, Alessio Stalla wrote: > On Wednesday, January 5, 2011 11:06:34 AM UTC+1, David wrote: > > java.lang.String cannot be cast to clojure.lang.IFn > >   [Thrown class java.lang.Cla

Re: if-let bug

2011-01-05 Thread Alessio Stalla
On Wednesday, January 5, 2011 11:06:34 AM UTC+1, David wrote: > > 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)

Re: if-let bug

2011-01-05 Thread Laurent PETIT
Hello David, what's the question ? 2011/1/5 David > 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 r

if-let bug

2011-01-05 Thread David
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