[ruby-core:93167] [Ruby trunk Feature#15799] pipeline operator
From:
mame@...
Date:
2019-06-16 00:17:38 UTC
List:
ruby-core #93167
Issue #15799 has been updated by mame (Yusuke Endoh).
I investigated history of pipeline operator. It is very long, so I wrote [an article in my blog](https://mamememo.blogspot.com/2019/06/a-brief-history-of-pipeline-operator.html). In short: In my current opinion, the current spec is somewhat reasonable, never so strange. I'm yet unsure if or not the feature is good to have in Ruby, though.
----------------------------------------
Feature #15799: pipeline operator
https://bugs.ruby-lang.org/issues/15799#change-78608
* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
Implemented the pipeline operator `|>`, a topic of "ruby committers vs the world" in RubyKaigi 2019.
Also a casual idea of rightward assignment.
```ruby
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
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>