Re: Problem using fn macro

2009-01-15 Thread Hugh Winkler
OK, thanks all, got it. Hugh On Thu, Jan 15, 2009 at 1:33 PM, redc...@gmail.com wrote: > > by having a parameter named "fn" you are shadowing the global "fn" > so what is happening is the "(fn ...)" form inside the function is > trying to apply the function you passed in to the arguments. the

Re: Problem using fn macro

2009-01-15 Thread redc...@gmail.com
by having a parameter named "fn" you are shadowing the global "fn" so what is happening is the "(fn ...)" form inside the function is trying to apply the function you passed in to the arguments. the function you passed in takes no arguments so you get the " Wrong number of args passed to" exceptio

Re: Problem using fn macro

2009-01-15 Thread Vincent Foley
When you're using fn as a parameter name, you are shadowing the fn special form. Like Mark Volkmann said, it is best that you refrain from using special form names and core macros and functions names to name your own things. f is the prefered notation to name a function passed to another functio

Re: Problem using fn macro

2009-01-15 Thread Mark Volkmann
Even if this gets fixed, I don't think it's a good idea to give parameters the same name as a widely used function. It's bound to confuse someone. On Thu, Jan 15, 2009 at 1:12 PM, Hugh Winkler wrote: > > I just encountered a surprise attempting to return a function from a > function. In the belo