The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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

    self.all(block)

Returns the

any

    self.any(block)

Returns the

collect

    self.collect(block)

Returns the

contains_all

    self.contains_all(*objects)

Returns the

count

    self.count(obj)

Returns the

count_by

    self.count_by(block)

Returns the

delete

    self.delete(*objects)

Returns the

Aliases: remove, discard

delete_first_if

    self.delete_first_if(block)

Returns the

delete_if

    self.delete_if(block)

Returns the

dump

    self.dump

Returns the

each

    self.each(block)

Returns the

each_2d

    self.each_2d(block)

Returns the

grep

    self.grep(block)

Returns the

Aliases: select

grep_2d

    self.grep_2d(block)

Returns the

iter

    self.iter

Returns the

join

    self.join(*rest)

Returns the

map

    self.map(block)

Returns the

map_2d

    self.map_2d(block)

Returns the

max

    self.max

Returns the

max_by

    self.max_by(block)

Returns the

min

    self.min

Returns the

min_by

    self.min_by(block)

Returns the

new

    self.new

Returns the

Aliases: call

none

    self.none(block)

Returns the

pop

    self.pop

Returns the

prod

    self.prod(block)

Returns the

Aliases: prod_by

prod_2d

    self.prod_2d(block)

Returns the

shift

    self.shift

Returns the

sort

    self.sort(block)

Returns the

sort_by

    self.sort_by(block)

Returns the

sum

    self.sum(block)

Returns the

Aliases: sum_by

sum_2d

    self.sum_2d(block)

Returns the

to_a

    self.to_a

Returns the

Aliases: values, to_array

to_bag

    self.to_bag

Returns the

to_set

    self.to_set

Returns the