#!/usr/bin/ruby

# Set
require 'set'

set1 = Set[1,2]
set1 = Set.new([1,2])

p set1

set2 = [1,2,3].to_set # 배열을 셋트로 변환

=begin

* length
* empty?
* include?
* subset?
* superset?
* disjoint?
* intersect?

=end


=begin

* add / add?
* merge
* replace

* clear
* delete / delete?
* subtract
* delete_if
* keep_if
* select
* reject

* | / union
* & / intersection
* - / difference
* ^
=end

=begin

* collect / map
* divide
* flatten
* join

* each

=end



END{
  # https://ruby-doc.org/3.3.0/stdlibs/set/Set.html
}
