NAME
Sidef::Types::Set::Set
DESCRIPTION
This class implements ...
SYNOPSIS
var a = Set(1,2,3,4)
var b = Set(2,3,5)
say (a ^ b) #=> Set(1, 4, 5)
say (a - b) #=> Set(1, 4)
say (a | b) #=> Set(1, 2, 3, 4, 5)
say (a & b) #=> Set(2, 3)
say a.has(2) #=> true
say a.len #=> 4
say b.map {|n| n**2 } #=> Set(4, 9, 25)
say b.grep {.is_odd} #=> Set(3, 5)
INHERITS
Inherits methods from:
* Sidef::Types::Hash::Hash
METHODS
&
a & b
Returns the
Aliases: ∩, and, intersection
+
a + b
Returns the
Aliases: concat
-
a - b
Returns the
Aliases: ∖, sub, diff, difference
...
a ... b
Returns the
Aliases: to_list
<<
a << b
Returns the
Aliases: add, push, append
^
a ^ b
Returns the
Aliases: xor, symdiff, symmetric_difference
|
a | b
Returns the
Aliases: ∪, or, union
∋
a ∋ b
Returns the
Aliases: has, exists, has_key, haskey, contain, include, contains, includes
∌
a ∌ b
Returns the
≡
a ≡ b
Returns the
≤
a ≤ b
Returns the
Aliases: ⊆, <=, is_subset
≥
a ≥ b
Returns the
Aliases: ⊇, >=, is_superset
all
Set.all()
Returns the
any
Set.any()
Returns the
collect
Set.collect()
Returns the
contains_all
Set.contains_all()
Returns the
count
Set.count()
Returns the
count_by
Set.count_by()
Returns the
delete
Set.delete()
Returns the
Aliases: remove, discard
delete_first_if
Set.delete_first_if()
Returns the
delete_if
Set.delete_if()
Returns the
dump
Set.dump()
Returns the
each
Set.each()
Returns the
each_2d
Set.each_2d()
Returns the
grep
Set.grep()
Returns the
Aliases: select
grep_2d
Set.grep_2d()
Returns the
iter
Set.iter()
Returns the
join
Set.join()
Returns the
map
Set.map()
Returns the
map_2d
Set.map_2d()
Returns the
max
Set.max()
Returns the
max_by
Set.max_by()
Returns the
min
Set.min()
Returns the
min_by
Set.min_by()
Returns the
new
Set.new()
Returns the
Aliases: call
none
Set.none()
Returns the
pop
Set.pop()
Returns the
prod
Set.prod()
Returns the
Aliases: prod_by
prod_2d
Set.prod_2d()
Returns the
shift
Set.shift()
Returns the
sort
Set.sort()
Returns the
sort_by
Set.sort_by()
Returns the
sum
Set.sum()
Returns the
Aliases: sum_by
sum_2d
Set.sum_2d()
Returns the
to_a
Set.to_a()
Returns the
Aliases: values, to_array
to_bag
Set.to_bag()
Returns the
to_set
Set.to_set()
Returns the