Oops!
Sorry, my fault :(
Sincerely,
ru
On 20 сен, 21:11, Meikel Brandmeyer wrote:
> Hi,
>
> Am 20.09.2011 um 18:47 schrieb ru:
>
> > So, we can't define the same method with different signatures in one
> > protocol. Is it justifiably?
>
> ??? You were shown the correct syntax: (defprotocol Fly
Oops!
Sorry, my fault :(
Sincerely,
ru
On 20 сен, 21:11, Meikel Brandmeyer wrote:
> Hi,
>
> Am 20.09.2011 um 18:47 schrieb ru:
>
> > So, we can't define the same method with different signatures in one
> > protocol. Is it justifiably?
>
> ??? You were shown the correct syntax: (defprotocol Fly
Hi,
Am 20.09.2011 um 18:47 schrieb ru:
> So, we can't define the same method with different signatures in one
> protocol. Is it justifiably?
??? You were shown the correct syntax: (defprotocol Fly (fly [x] [x y])).
Sincerely
Meikel
--
You received this message because you are subscribed to th
Thanks Simon,
This form is working:
(ns fly.bird)
(defprotocol Fly
(fly [this])
(fly2 [this x]))
(defrecord Bird [nom species]
Fly
(fly [this] (str (:nom this) " flies.."))
(fly2 [this x] (str (:nom this) " flies " x)))
So, we can't define the same method
Try using this for the defprotocol form:
(defprotocol Fly
(fly [this] [this x]))
I don't know whether your defprotocol form is supposed to be allowed.
Either way, better error message(s) would be good.
--
You received this message because you are subscribed to the Google
Groups
Dear!
Loading the file:
(ns fly.bird)
(defprotocol Fly
(fly [this])
(fly [this x]))
(defrecord Bird [nom species]
Fly
(fly [this] (str (:nom this) " flies.."))
(fly [this x] (str (:nom this) " flies " x)))
got this error message:
java.lang.IllegalArgumen