-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
core.clj
119 lines (113 loc) · 2.71 KB
/
core.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
(ns methodical.core
"Combined interface to everything in Methodical you'd normally want to use."
(:refer-clojure :exclude [defmulti defmethod methods get-method remove-method
remove-all-methods prefer-method prefers])
(:require methodical.impl
methodical.interface
methodical.macros
methodical.util
methodical.util.trace
[potemkin :as p]))
;; fool cljr-clean-ns and the namespace linter so it doesn't remove these automatically
(comment
methodical.impl/keep-me
methodical.interface/keep-me
methodical.macros/keep-me
methodical.util.trace/keep-me
methodical.util/keep-me)
(p/import-vars
[methodical.macros
defmulti
defmethod]
[methodical.interface
;; MethodCombination
allowed-qualifiers
combine-methods
transform-fn-tail
;; MethodTable
primary-methods
add-primary-method
remove-primary-method
add-aux-method
remove-aux-method
;; Dispatcher
default-dispatch-value
prefers
with-prefers
dominates?
;; MultiFnImpl
method-combination
dispatcher
with-dispatcher
method-table
with-method-table
effective-method]
[methodical.impl
;; method combinations
clojure-method-combination
clos-method-combination
thread-first-method-combination
thread-last-method-combination
do-method-combination
min-method-combination
max-method-combination
+-method-combination
seq-method-combination
concat-method-combination
and-method-combination
or-method-combination
;; dispatchers
standard-dispatcher
everything-dispatcher
multi-default-dispatcher
;; method tables
clojure-method-table
standard-method-table
;; caches
simple-cache
watching-cache
;; multifn impls
standard-multifn-impl
cached-multifn-impl
default-multifn-impl
clojure-multifn-impl
clos-multifn-impl
;; multifn
uncached-multifn
multifn
default-multifn]
[methodical.util
primary-method
matching-primary-methods
applicable-primary-method
effective-primary-method
aux-methods
matching-aux-methods
default-primary-method
default-aux-methods
default-effective-method
dispatch-fn
dispatch-value
effective-dispatch-value
remove-all-primary-methods
remove-all-aux-methods
remove-all-aux-methods-for-dispatch-val
add-aux-method-with-unique-key
remove-aux-method-with-unique-key
remove-all-methods
prefer-method
;; destructive ops
add-primary-method!
remove-primary-method!
remove-all-primary-methods!
add-aux-method!
remove-aux-method!
remove-all-aux-methods!
remove-all-aux-methods-for-dispatch-val!
add-aux-method-with-unique-key!
remove-aux-method-with-unique-key!
remove-all-methods!
prefer-method!
with-prefers!]
[methodical.util.trace
trace])