Sha256: edd447a85c374673969bdd32ef442bf61ee0647d4cfc68c8fda99a2c4a0b1f4a
Contents?: true
Size: 485 Bytes
Versions: 104
Compression:
Stored size: 485 Bytes
Contents
(ns proverb (:require [clojure.string :as str])) (def subjects ["nail" "shoe" "horse" "rider" "message" "battle" "kingdom"]) (def last-line "And all for the want of a horseshoe nail.") (defn- line [[cause-subject effect-subject]] (format "For want of a %s the %s was lost." cause-subject effect-subject)) (def proverb (->> subjects (partition 2 1) (map line) (#(conj (vec %) last-line)) (str/join "\n")))
Version data entries
104 entries across 104 versions & 1 rubygems