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
(ns foo.auth.google | |
(:require [clojure.string :as str] | |
[clojure.java.io :as io] | |
[clojure.data.json :as json] | |
[clojure.logging :refer :all] | |
[friend-oauth2.util :refer [format-config-uri]] | |
[friend-oauth2.workflow :as oauth2]) | |
(:import [java.security.cert CertificateFactory] | |
[org.apache.commons.codec.binary Base64])) |
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 helm-headlines (headline buffer-name good-regex exception-regex) | |
"Display headlines for the current file. | |
Displays lines where good-regex matches, except for those | |
which also match exception-regex." | |
;; Fixes bug where the current buffer sometimes isn't used | |
(setq helm-current-buffer (current-buffer)) | |
;; https://groups.google.com/forum/#!topic/emacs-helm/YwqsyRRHjY4 | |
(jit-lock-fontify-now) |