Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Undo overwrite of built-in function in Clojure

I managed to redefine the built-in function vector by mistake.

More specifically, this is what I did:

(def vector [1 2 3 4 5 6])

And this is what I intended to do:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

(def my-vector (vector 1 2 3 4 5 6))

Is there some way to "undo" that mistake, without restarting the REPL?

I.e., reverting vector back to its default definition.

>Solution :

(def vector #'clojure.core/vector)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading