I have a protocol:
(defprotocol IInterval
(-duration [in]))
and the record that implements it:
(defrecord Interval [start end]
IInterval
(-duration [_] (- end
start)))
if i create (def i1 (Interval 0 1000))
how can i use a method implements?where:
(implements? IInterval i1) => true
source
share