rosado / cloak

simple automation tool inspired by rake, written in Clojure

This URL has Read+Write access

cloak / tests / ONCE
100644 19 lines (13 sloc) 0.323 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(ns cloak.tests.once
  (:use rosado.cloak.main)
  (:use rosado.cloak.actions))
 
(def *counter-a* (ref 0))
(def *counter-b* (ref 0))
 
(defn increment [c]
  (dosync (ref-set c (inc @c))))
 
(task :a
(increment *counter-a*)
(println "ONCE: Doing :a"))
 
(task :b
(increment *counter-b*)
(println "ONCE: Doing :b"))