23

The source for clojure.core appears to assume the pre-existence of fn*. Where is this defined? What else is needed for bootstrap (over existing Java types)? How is it all put together?

Maybe this has already been asked? I am having a hard time getting good search results for fn*.

update: Changed "bootstrap itself" to "bootstrap" in title, because I didn't want to imply Clojure was self-hosting.

Siguza
  • 21,155
  • 6
  • 52
  • 89
andrew cooke
  • 45,717
  • 10
  • 93
  • 143

1 Answers1

12

in src/jvm/clojure/lang/Compiler.java 46 line:

static final Symbol FN = Symbol.intern("fn*");

fn* implement by clojure compiler, as others special form, I guess.

Update: in analyzeSeq method, 6452-6353 line:

    if(op.equals(FN))
        return FnExpr.parse(context, form, name);

please check out FnExpr class implement code.

number23_cn
  • 4,611
  • 26
  • 31