Ruby/Range/find all
Материал из Wiki.crossplatform.ru
Версия от 17:10, 26 мая 2010; (Обсуждение)
find all odd elements
(1..8).find_all {|x| x%2==1} # => [1,3,5,7]: find all odd elements
Личные инструменты |
ПросмотрыRuby/Range/find allМатериал из Wiki.crossplatform.ruВерсия от 17:10, 26 мая 2010; (Обсуждение)
find all odd elements(1..8).find_all {|x| x%2==1} # => [1,3,5,7]: find all odd elements |