Project

General

Profile

Feature #15799

pipeline operator

Added by nobu (Nobuyoshi Nakada) over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:92432]

Description

Implemented the pipeline operator |>, a topic of "ruby committers vs the world" in RubyKaigi 2019.
Also a casual idea of rightward assignment.

1.. |> take 10 |> map {|e| e*2} |> (x)
p x #=> [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]

https://github.com/nobu/ruby/tree/feature/pipeline


Related issues

Related to Ruby master - Feature #15921: R-assign (rightward-assignment) operatorClosedmatz (Yukihiro Matsumoto)Actions
Related to Ruby master - Feature #14392: Pipe operatorOpenActions

Also available in: Atom PDF