(deftype Bag [state] Object (toString [bag] (str \"Bag???\" state))) I want the toString to look something like
I am trying to use clojure in a compiler and thus need to parameterize calls to deftype; however, I am having difficulty making the type hints carry through.Consider the following code:
I\'m trying to create a new type in Clojure using deftype to implement a two dimensional (x,y) coordinate, which implements a \"Location\" protocol.
I\'m attempting to use deftype (from the bleeding-edge clojure 1.2 branch) to create a java class that implements the java Servlet interface.I would expect the code below to compile (even though it\'s
Clojure structs can be arbitrarily extended, adding new fields. Is it possible to extend types (created using deftype) in a similar way?
In clojure, how do I type type hint a type that I have created?(I want to nest the types.) e.g.I had thought that this would work: