Filters elements of the deque by given condition.
Parameters:
Returns:
a new deque
327 328 329
# File 'lib/algorithmix/data_structure/generic/deque.rb', line 327 def select(&block) Deque.new( @container.select { |e| block.call(e)}) end