Created
February 11, 2011 02:17
-
-
Save ndimiduk/821802 to your computer and use it in GitHub Desktop.
likely multiple things broken here...
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
;; format.clj | |
(defn- format-related-filter ...) | |
(defn- format-related-parsing ...) | |
(defn read-raw | |
"utility function for reading common file type. source is a path" | |
[source] | |
(let [source (hfs-textline source)] | |
(<- [?field1 ?field2] | |
(source ?line) | |
(format-related-filter ?line) | |
(format-related-parsing ?line :> ?field1 ?field2)))) | |
;; business.clj | |
(defn- process-raw-to-business-atoms1 ...) | |
(defn- process-raw-to-business-atoms1 ...) | |
(defn- business-atoms | |
"generate the domain-level primitives from raw source. source is a path" | |
[source] | |
(let [source (read-raw source)] | |
(<- [?atom1 ?atom2 ?atom3 ?atom4 ?atom5] | |
(source ?f1 ?f2) | |
(process-raw-to-business-atoms1 ?f1 ?f2 :> ?atom1 ?atom2 ?atom3) | |
(process-raw-to-business-atoms2 ?f2 ?atom3 :> ?atom4 ?atom5)))) | |
(defn business-api-fn | |
"execute some business flow from raw data path" | |
([source] ; -- for use in other flows | |
(let [source (business-atoms source)] | |
(<- [?result1 ?result2] | |
(source ?a1 ?a2 ?a3 ?a4 ?a5) | |
(more-business-logics-resulting-in ... :> ?result1 ?result2)))) | |
([source destination] ; -- to be exposed via command line | |
(let [source (business-api-fun source)] | |
(?<- (hfs-seqfile destination) [?result1 ?result2] (source ?result1 ?result2))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment