From e216b9be95e2c52f62e27294714ba6bb8fd58d1f Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 2 Nov 2020 09:17:03 +0300 Subject: feature(core): more multimethod related functions --- macros_test.fnl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'macros_test.fnl') 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) -- cgit v1.2.3