1;;   Random Clojure to test the Analyzer
2;;   @author Farid Zakaria
3
4(ns opengrok
5    "This is a sample test file that will be used by the ClojureAnalyzerFactoryTest")
6
7;; Calculate the power set
8(defn power-set [coll]
9    (reduce (fn [sols a]
10                (clojure.set/union (set (map #(conj % a) sols)) sols)) #{#{}} coll))
11
12;; a private function
13;; Calculate the power set
14(defn- power-set-private [coll]
15       "This is the power-set API but private"
16      (reduce (fn [sols a]
17                  (clojure.set/union (set (map #(conj % a) sols)) sols)) #{#{}} coll))
18
19(defstruct author :first :last)
20
21;constant definition
22(def author-first-name "Farid")
23(def author-last-name "Zakaria")
24(def Farid (struct author author-first-name author-last-name))