#!/usr/local/bin/ruby p [1, 2, 3, 4, 5].select.with_index {|a| a % 2 == 0}.map {|a, i| i }