Can I clean the repl?

后端 未结 8 1875
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 13:50

I have played with a lot of code in a repl console, how can I clear it? I would like a fresh one without restarting it. Can that be done?

8条回答
  •  Happy的楠姐
    2020-12-23 14:27

    It depends what you mean by 'clean'. To remove all namespaces within a 'package' you can use:

    (mapv remove-ns 
      (map symbol 
        (filter #(.startsWith % "org.mycompany") 
          (map str (all-ns)))))
    

提交回复
热议问题