Protocols permit the declaration of functions with multiple argument lists:

(defprotocol FooP
  (bar [x] [x y] ""))

It is straightforward to implement those using extend or extend-type:

(deftype Foo
  [f] :as this)

(extend-type ::Foo
  FooP
    (bar ([x] (:f x))
         ([x y] [(:f x) y])))

However, I haven't found a way to implement them directly in the deftype form. Is this possible? If so, how?

Konrad.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to