What is fn* and how does Clojure bootstrap?

后端 未结 1 616
我寻月下人不归
我寻月下人不归 2021-02-07 01:04

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

1条回答
  •  有刺的猬
    2021-02-07 01:13

    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.

    0 讨论(0)
提交回复
热议问题