Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

(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.

like image 424
leifericf Avatar asked Jul 17 '26 13:07

leifericf


1 Answers

(def vector #'clojure.core/vector)

like image 171
akond Avatar answered Jul 20 '26 12:07

akond



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!