Last active
August 29, 2015 14:19
-
-
Save davidrupp/1ae6fa19a9ea5bae7b50 to your computer and use it in GitHub Desktop.
Revisions
-
davidrupp revised this gist
Apr 23, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,5 +3,5 @@ ; we don't really need to name the argument, because we don't use it ; but we *do* need to include it; otherwise we'll get an arity exception (alter-var-root #'thing (fn [_] nil)) ; value of thing is now nil ; equivalently (kind of) ... (alter-var-root #'thing (constantly nil)) -
davidrupp revised this gist
Apr 23, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,3 +3,5 @@ ; we don't really need to name the argument, because we don't use it ; but we *do* need to include it; otherwise we'll get an arity exception (alter-var-root #'thing (fn [_] nil)) ; value of thing is now nil ; equivalently ... (alter-var-root #'thing (constantly nil)) -
davidrupp created this gist
Apr 23, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ (def thing 1) (alter-var-root #'thing (fn [old-val] nil)) ; value of thing is now nil ; we don't really need to name the argument, because we don't use it ; but we *do* need to include it; otherwise we'll get an arity exception (alter-var-root #'thing (fn [_] nil)) ; value of thing is now nil