Improvement of Symbol and Proc

Issue #4146 has been updated by Nobuyoshi N…

Related to Feature #9076: New one-argument block syntax: &. added

Feature #4146: Improvement of Symbol and Proc

  • Author: Nobuyoshi N.
  • Status: Rejected
  • Priority: Normal
  • Assignee: Nobuyoshi N.
  • Category: core
  • Target version:

現在Symbol#to_procで %w[12 45 32].map(&:to_i) のようなことはできますが、

%w[12 45 32].map(&:to_i(9)).map(&:*(2)) #=> [22, 82, 58]
%w[abc def ghi].map(&:[1]) #=> [“b”, “e”, “h”]

symbol_lambda.diff (5.39 KB)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs