Ruby 2.1.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Enumerator::Lazyクラス > drop
drop(n) -> Enumerator::Lazy
[permalink][rdoc]Enumerable#drop と同じですが、配列ではなくEnumerator::Lazy を返します。
1.step.lazy.drop(3)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop(3)>
1.step.lazy.drop(3).take(10).force
# => [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
[SEE_ALSO] Enumerable#drop