Hi, Tim
Can you describe you task?
Sets (and other collections) in clojure don't use generics, as I know. You
can add element to set and check if set contains element. Why do you need
MyType? To allow add only MyType elements in set?

On Tue, Aug 10, 2010 at 11:40 PM, Tim Daly <d...@axiom-developer.org> wrote:

> I have java code that reads:
>
>
> Set<MyType> s = new HashSet();
>
> I don't know how to write the parameter <MyType> in clojure
> where MyType is a Java class.
>
> Laurent PETIT wrote:
>
>> 2010/8/10 Tim Daly <d...@axiom-developer.org <mailto:
>> d...@axiom-developer.org>>
>>
>>
>>    How do I construct
>>     Set<MyType> s = new HashSet();
>>    in clojure?
>>
>>
>> Can you be more precise about the context of what you're trying to achieve
>> ?
>>
>>
>> 'cause the naive answer to your question is
>>
>> (def s #{})
>> or
>> (let [s #{}] ...)
>>
>> but I think you have a usecase in mind I'm not clearling seeing yet from
>> your question ...
>>
>> --
>> 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<clojure%2bunsubscr...@googlegroups.com>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
> --
> 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<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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