Hi, Am 05.10.2009 um 19:29 schrieb cody koeninger:
Here we have the smell! You cannot define functions with a function. You have to use a macro!I am not clear on what you mean by this. From a user's point of view, what is the difference between defining a function, and interning a var with a fn object as its value? user> (defn define-function [name] (intern *ns* name (fn [] (str "called a generated function: " name)))) #'user/define-function user> (some-function) ; Evaluation aborted. user> (define-function 'some-function) #'user/some-function user> (some-function) "called a generated function: some-function" Or is your point just that #'fn is a macro?
I stand corrected. Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature