Class: Array
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.step(i, *a, &b) ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/alib-0.5.1/stdext.rb', line 89 def self.step i, *a, &b #--{{{ j, s, ignored = *a i, j = 0, i if j.nil? s ||= (j < i ? -1 : 1) list = new i.step(j,s){|k| list << k} list.map! &b if b list #--}}} end |