Created
January 28, 2014 06:46
-
-
Save devn/8663262 to your computer and use it in GitHub Desktop.
winamp skins for clojure
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 defjam.core) | |
(defn __verb [__noun __noun_place] | |
(filter #{__noun} __noun_place)) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(ns defjam.dude | |
(:require [clojure.java.io :as io] | |
[clojure.string :as str] | |
[clojure.pprint :as pp] | |
[defjam.roar :as roar])) | |
(def evald | |
(let [template (slurp (io/file "/Users/devn/dev/defjam/src/defjam/core.clj"))] | |
(-> template | |
(str/replace #"__verb" "snarf") | |
(str/replace #"__noun_place" "swamp") | |
(str/replace #"__noun" "gold")))) | |
(defn roar! [] | |
(with-open [f (io/writer (io/file "/Users/devn/dev/defjam/src/defjam/roar.clj"))] | |
(binding [*out* f] | |
(println evald)))) | |
(roar/snarf :gold [:armpits :banks :clouds :gold :air :gold]) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(ns defjam.roar) | |
(defn snarf [gold swamp] | |
(filter #{gold} swamp)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment