Skip to content

Instantly share code, notes, and snippets.

@Licenser
Created February 18, 2010 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Licenser/308078 to your computer and use it in GitHub Desktop.
Save Licenser/308078 to your computer and use it in GitHub Desktop.
(ns utils)
(declare *log*)
(defn log [msg]
(dosync (alter *log* cons msg)))
(ns backend
(:use utils))
(defn some-fn [x]
(log x))
(defn pmap-fn [list batch-size]
(doall (pmap (fn [batch] (doall (map #(some-fn %) batch))) (partition batch-size list))))
(ns frontend
(:use utils)
(:require backend))
(def run
(binding [*log* (ref '())]
(backend/run)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment