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 dedent-text.core | |
(:use [clojure.string :only [blank?]])) | |
(defn all-equal? | |
"Returns the value if all values are equal, otherwise nil." | |
[& values] | |
(when (apply = values) (first values))) | |
(defn count-common-indentation | |
"Returns length of common indentation of strings." |