It is impossible (undecidable) to tell precisely which functions a
function will call. Therefore you will need to consider not exactly
set of functions that a function will call, but some superset of that.
Why not take as your superset all functions? That is, always compile
all functions.

On Aug 9, 6:54 pm, CuppoJava <patrickli_2...@hotmail.com> wrote:
> Hello everyone,
> Just for educational purposes, I'm writing a simple lisp compiler and
> am stuck on a small problem.
>
> I'm trying to write a function called (compile-function), which will
> take a function as input and compile it.
>
> If that function calls other functions, I would like (compile-
> function) to automatically compile the called functions as well.
>
> But I'm stuck on how to tell whether a function will be called or not.
> Particularly when functions are passed around as objects.
>
> So the question is this: Given a function f, how can I find all the
> functions that f depends on?
>
> Thanks a lot for your help
>   -Patrick

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to