Class: Set

Inherits:
Object show all
Defined in:
lib/raskell/array.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.to_stream(set) ⇒ Object



145
146
147
# File 'lib/raskell/array.rb', line 145

def self.to_stream(set)
  set.to_a.sort.to_stream
end

Instance Method Details

#push(item) ⇒ Object



153
154
155
156
# File 'lib/raskell/array.rb', line 153

def push(item)
  self << item
  self
end

#to_streamObject



149
150
151
# File 'lib/raskell/array.rb', line 149

def to_stream
  self.class.to_stream(self)
end