Permalink
Browse files

cleaning the funcification of constrain lists

  • Loading branch information...
1 parent 050b98b commit e049e07d8b22c1c06338c3ad7d29495ca642b4bc @fogus committed Aug 18, 2010
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/fogus/me/provide.clj
View
@@ -29,7 +29,7 @@
'([n] [pos?])])
-(defn build-pre-post [cnstr]
+(defn build-pre-post-map [cnstr]
(let [[L M R] (partition-by #{'=>} cnstr)]
{:pre (when (not= L '(=>)) L)
:post (if (= L '(=>)) M R)}))
@@ -43,8 +43,10 @@
(defn build-map [args cnstr]
[args
- (manip-map (partial funcify args)
- [:pre :post]
- (build-pre-post cnstr))])
+ (manip-map (partial funcify '[%])
+ [:post]
+ (manip-map (partial funcify args)
+ [:pre]
+ (build-pre-post-map cnstr)))])
(map (fn [[a c]] (build-map a c)) (take 2 tests))

0 comments on commit e049e07

Please sign in to comment.