functions as return values

2013-02-23 Thread Larry Travis
In Clojure, if I have a function call that asks for return of a function, for example user ((fn [a] (fn [b] (+ (inc a) (* b b 5) I get the function name #user$eval4164$fn__4165$fn__4166 user$eval4164$fn__4165$fn__4166@29770daa But what I would like to get is an expression that defines

Re: functions as return values

2013-02-23 Thread Larry Travis
I am afraid I didn't ask my question clearly. Michael's solution would give as output (fn [b] (+ (inc a) (* b b))) What I want as output is (fn [b] (+ 6 (* b b))) ... where those expressions within the inner-lambda scope (of the original nested-lambda expression) that can be evaluated

Re: functions as return values

2013-02-23 Thread AtKaaZ
= ((fn [a] (backtick/template (fn [b] (+ ~(inc a) (* b b))) ) ) 5) (fn [b] (+ 6 (* b b))) https://github.com/brandonbloom/backtick = (eval ((fn [a] (backtick/template (fn [b] (+ ~(inc a) (* b b))) ) ) 5)) #funxions$eval3145$fn__3146 util.funxions$eval3145$fn__3146@4a7c5889 = ((eval ((fn [a]