Help for this page

Select Code to Download


  1. or download this
  2. or download this
    class Array
      def sieve (*how)
    ...
      Proc.new { |n| n < 5 },
      Proc.new { |n| n < 10 }
    ) { |x| x * 2 }.inspect
    
  3. or download this
    sieve {block 1}.{block 2}.{block 3}.sift(array) {how}
    
  4. or download this
    this_sieve = sieve {b1}.{b2}.{b3}
    # and then
    this_sieve.sift(array) { how }