Hi, At Mon, 11 Jul 2005 10:50:31 +0900, Peñá, Botp wrote in [ruby-talk:147720]: > You're vague plan produces clearer ruby.. > > but isn't > each_with_index.map > > so close to being > map_with_index > > ? > > (1..6).map_with_index{|x,i|[2,5].include?(i) ? x : x*2} is very easy to my > tiny brain since all i have to remember is map (just like (in array) all i > have to focus is each, then i follow thru with each_with_index) What about Enumerator#with_index? [1,2,3,4,5,6].map.with_index {|x,i|[2,5].include?(i) ? x : x*2} -- Nobu Nakada