leifericf
leifericf

Reputation: 2372

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.

Upvotes: 2

Views: 71

Answers (1)

akond
akond

Reputation: 16045

(def vector #'clojure.core/vector)

Upvotes: 8

Related Questions