Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
This file contains 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 characters
(defun source (filename) | |
"Update environment variables from a shell source file." | |
(interactive "fSource file: ") | |
(message "Sourcing environment from `%s'..." filename) | |
(with-temp-buffer | |
(shell-command (format "diff -u <(true; export) <(source %s; export)" filename) '(4)) | |
(let ((envvar-re "declare -x \\([^=]+\\)=\\(.*\\)$")) |
This file contains 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 characters
$ history | awk {'print $2, $3, $4'} | sort | uniq -c | sort -k1 -rn | head -n 30 | |
610 git status | |
568 git commit -m | |
491 git add . | |
252 git push origin | |
176 bundle | |
138 rails s | |
128 ls | |
120 git commit --amend | |
114 git reset --hard |
NewerOlder