Clojure #= reader macro

前端 未结 2 665
长情又很酷
长情又很酷 2021-01-11 10:34

I just \"discovered\" the #= reader macro from a post on Stackoverflow and it solves a problem. How likely is this reader macro to become an official (documen

2条回答
  •  轮回少年
    2021-01-11 11:20

    It is used by the core language when something is printed with *print-dup* true, so I'd wager that it is going to stay. No idea why it is not documented.

    user=> (binding [*print-dup* true] (prn {:foo 1 :bar 2}))
    #=(clojure.lang.PersistentArrayMap/create {:foo 1, :bar 2})
    nil
    

提交回复
热议问题