Re: [julia-users] Re: dictionaries of sets -- or arrays of sets
You can also just use the `in` infix operator. On Mon, Jan 4, 2016 at 1:04 PM, Cameron McBride wrote: > Also, in the REPL you can use the help files. For example, try typing "?∈" > (which shows this is basically the in() function, hence the \inTAB > suggestion by Kristoffer). > > Cameron > > On Mon, Jan 4, 2016 at 12:59 PM, Kristoffer Carlsson < > kcarlsso...@gmail.com> wrote: > >> You can enter \in and then press TAB in the REPL. >> >> Here is a list: >> http://docs.julialang.org/en/release-0.4/manual/unicode-input/ >> >> Many editors have packages that support entering these type of unicode >> characters. >> > >
Re: [julia-users] Re: dictionaries of sets -- or arrays of sets
Also, in the REPL you can use the help files. For example, try typing "?∈" (which shows this is basically the in() function, hence the \inTAB suggestion by Kristoffer). Cameron On Mon, Jan 4, 2016 at 12:59 PM, Kristoffer Carlsson wrote: > You can enter \in and then press TAB in the REPL. > > Here is a list: > http://docs.julialang.org/en/release-0.4/manual/unicode-input/ > > Many editors have packages that support entering these type of unicode > characters. >
Re: [julia-users] Re: dictionaries of sets -- or arrays of sets
You can enter \in and then press TAB in the REPL. Here is a list: http://docs.julialang.org/en/release-0.4/manual/unicode-input/ Many editors have packages that support entering these type of unicode characters.
Re: [julia-users] Re: dictionaries of sets -- or arrays of sets
Yes! Thanks! Unsure how to generate a '∈', however. Copied yours; and I guess there's no problem once I've pasted it into a .jl file as needed... but where's a handy reference to such symbols, while I'm at it? On Mon, Jan 4, 2016 at 9:17 AM, Steven G. Johnson wrote: > > > On Monday, January 4, 2016 at 9:57:35 AM UTC-7, Forrest Curo wrote: >> >> I can do something like the following with no complaint: >> julia> ns = Dict{Int8,Set{Int8}} >> > > What you've created is the type, but what you want is an instance of the > type. Do > > ns = Dict{Int8,Set{Int8}}() > > and then it should work as expected. e.g. > > ns[1] = Set{Int8}([3,7]) > > push!(ns[1], 17) > > isempty(ns[1]) > > 3 ∈ ns[1] > > > work. >
[julia-users] Re: dictionaries of sets -- or arrays of sets
On Monday, January 4, 2016 at 9:57:35 AM UTC-7, Forrest Curo wrote: > > I can do something like the following with no complaint: > julia> ns = Dict{Int8,Set{Int8}} > What you've created is the type, but what you want is an instance of the type. Do ns = Dict{Int8,Set{Int8}}() and then it should work as expected. e.g. ns[1] = Set{Int8}([3,7]) push!(ns[1], 17) isempty(ns[1]) 3 ∈ ns[1] work.