Closed carocad closed 6 years ago
A lot of service are going to be simply a composition of smaller ones.
The code for it is generally the same and can be generalized by just requesting a spec, a function and some optional arguments.
(if-not (nil? chan) this (let [chan (async/chan 3)] (go-loop [_ nil] (let [request (async/<! chan)] (if (nil? request) nil ;; stops looping (if (s/valid? ::request request) (recur (handle! (assoc request ::access_token (:mapbox config)) (:chan http))) (recur (s/explain ::request request))))))
this is no longer valid as we dont use the architecture anymore
A lot of service are going to be simply a composition of smaller ones.
The code for it is generally the same and can be generalized by just requesting a spec, a function and some optional arguments.