refactoring to support grouping simply.
This commit is contained in:
10
src/cljc/auto_ap/utils.cljc
Normal file
10
src/cljc/auto_ap/utils.cljc
Normal file
@@ -0,0 +1,10 @@
|
||||
(ns auto-ap.utils)
|
||||
|
||||
(defn by
|
||||
([f xs]
|
||||
(by f identity xs))
|
||||
([f fv xs]
|
||||
(reduce
|
||||
#(assoc %1 (f %2) (fv %2))
|
||||
{}
|
||||
xs)))
|
||||
Reference in New Issue
Block a user