[julia-users] Re: haskey for Set

2015-11-12 Thread Seth
in(el, S) or  el in S.

On Thursday, November 12, 2015 at 2:36:28 PM UTC-8, Freddy Chua wrote:
>
> haskey does not work for Set ? It only works for Dict. Should it be that 
> way? How do I test whether an element is in a Set?
>


Re: [julia-users] Re: haskey for Set

2015-11-12 Thread Freddy Chua
that works, thank you.

Freddy Chua


On Thu, Nov 12, 2015 at 3:06 PM, Seth  wrote:

> in(el, S) or  el in S.
>
>
> On Thursday, November 12, 2015 at 2:36:28 PM UTC-8, Freddy Chua wrote:
>>
>> haskey does not work for Set ? It only works for Dict. Should it be that
>> way? How do I test whether an element is in a Set?
>>
>


Re: [julia-users] Re: haskey for Set

2015-11-12 Thread Seth
Also note the equivalent unicode methods:

∈(item,collection) -> Bool
∋(collection,item) -> Bool
∉(item,collection) -> Bool
∌(collection,item) -> Bool

All(?) of which can also be infixed.

On Thursday, November 12, 2015 at 4:42:21 PM UTC-8, Freddy Chua wrote:
>
> that works, thank you.
>
> Freddy Chua
>
>
> On Thu, Nov 12, 2015 at 3:06 PM, Seth  > wrote:
>
>> in(el, S) or  el in S.
>>
>>
>> On Thursday, November 12, 2015 at 2:36:28 PM UTC-8, Freddy Chua wrote:
>>>
>>> haskey does not work for Set ? It only works for Dict. Should it be that 
>>> way? How do I test whether an element is in a Set?
>>>
>>
>