Project

General

Profile

Actions

Feature #9023

open

Array#tail

Added by fuadksd (Fuad Saud) about 11 years ago. Updated almost 3 years ago.

Status:
Assigned
Target version:
-
[ruby-core:57862]

Description

I propose the addition of a tail method to the Array class that returns all elements but the first. It is a pretty common pattern in functional programming, but not limited to - I use it extensively in all kinds of apps/gems. The implementation would be pretty trivial, I won't risk a patch to MRI because I'm uninitiated on ruby core matters, but powerpack gem (http://github.com/bbatsov/powerpack) implements it in ruby in terms of slices.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0