Project

General

Profile

Actions

Feature #16939

closed

Alias _1 as _ for block numbered params

Added by x3qt (Jury Paliakou) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:98678]

Description

I propose to alias _1 as _ for block numbered params, so the following statements should be equal –

[1,2,3].map { _1 ** 2 }

[1,2,3].map { _ ** 2 }

There is an anonymous function argument literal in Clojure and it feels natural all the way, hope we can have the one too.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0