Project

General

Profile

Actions

Feature #5551

closed

Enumerable#rdrop

Added by sawa (Tsuyoshi Sawada) over 12 years ago. Updated over 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-dev:44777]

Description

There is Enumerable#drop(n), which drops elements on the left side, but there is no counterpart for dropping the right side. It will be convenient if there is Enumerable#rdrop(n) that drops the elements on the right side.

[1, 2, 3, 4, 5].rdrop(2) # => [1, 2, 3]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0