Filter: reject items that does not meet some criteria.

class IsEvenFunction
  super Function[Int, Bool]
  redef fun apply(i) do return i % 2 == 0
end
assert [1,2,3,4,8].iterator.select(new IsEvenFunction).to_a  == [2,4,8]

Property definitions

pipeline :: pipeline $ Iterator :: select
	# Filter: reject items that does not meet some criteria.
	#
	#     class IsEvenFunction
	#       super Function[Int, Bool]
	#       redef fun apply(i) do return i % 2 == 0
	#     end
	#     assert [1,2,3,4,8].iterator.select(new IsEvenFunction).to_a  == [2,4,8]
	fun select(predicate: Function[E, Bool]): Iterator[E]
	do
		return new PipeSelect[E](self, predicate)
	end
lib/pipeline/pipeline.nit:151,2--161,4