diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-11-02 09:17:03 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-11-02 09:17:03 +0300 |
| commit | e216b9be95e2c52f62e27294714ba6bb8fd58d1f (patch) | |
| tree | cf590436b7f0cbfe70e4d15739004c2487bde2ab /macros_test.fnl | |
| parent | 3b9aa01b8b82f8710eb19fc829b937af42d9dbcb (diff) | |
feature(core): more multimethod related functions
Diffstat (limited to 'macros_test.fnl')
| -rw-r--r-- | macros_test.fnl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/macros_test.fnl b/macros_test.fnl index 246b639..f8c72fa 100644 --- a/macros_test.fnl +++ b/macros_test.fnl @@ -68,6 +68,10 @@ (assert-eq (if-some [a nil] a :nothing) :nothing))) (deftest multimethods + (testing defmulti + (defmulti x (fn [x] x)) + (assert-eq (defmulti x (fn [x] (+ x 1))) nil)) + (testing defmethod (defmulti fac identity) (defmethod fac 0 [_] 1) |