Re: Problem passing a function into a function

2011-11-03 Thread Sam Aaron
Hi Andy, the issue you're having is that using the & for rest args captures the rest of the arguments as a seq. Therefore when you pass a fn as the final parameter to #'timed-agent, #'test-func is not bound to the fn you passed in but a seq containing that fn. You either need to pull out the fn

Re: Problem passing a function into a function

2011-11-03 Thread Chris Perkins
The problem is that inside your timed-agent function, "test-func" is not a function - it is a one-element sequence containing your test function. That's what using & in the arguments vector does. Try it like this: (defn timed-agent [limit timed-func & [test-func]] ...) - Chris -- You receiv