Re: defn inside defn

2014-11-15 Thread Fluid Dynamics
On Saturday, November 15, 2014 11:31:50 AM UTC-5, Udayakumar Rayala wrote: > > twice> > > Hi, > > Is it idiomatic to have defn inside defn? eastwood throws def-in-def > warning when I have the following code: > > (defn double-square [y] > (defn square [x

Re: defn inside defn

2014-11-15 Thread Andy Fingerhut
ers that use or require/refer it). Andy On Sat, Nov 15, 2014 at 8:31 AM, Udayakumar Rayala wrote: > twice> > > Hi, > > Is it idiomatic to have defn inside defn? eastwood throws def-in-def > warning when I have the following code: > > (defn double-sq

Re: defn inside defn

2014-11-15 Thread David Nolen
Not idiomatic. defn is always top level. David On Sat, Nov 15, 2014 at 11:31 AM, Udayakumar Rayala wrote: > twice> > > Hi, > > Is it idiomatic to have defn inside defn? eastwood throws def-in-def warning > when I have the following code: > > (defn double-square [y

defn inside defn

2014-11-15 Thread Udayakumar Rayala
Hi, Is it idiomatic to have defn inside defn? eastwood throws def-in-def warning when I have the following code: (defn double-square [y] (defn square [x] (* x x)) (+ (square y) (square y))) The above code is a simplified example to show the problem. In the above case, square