News for hackers. Stuff that matters.
Re:"Useless syntax sugar": Numbered block parameters in Ruby by inopinatus on Thursday October 12, 2023 @09:47PM (#37865589)
Even without patching the standard library:

    irb> [[1,2],[3,4]].each_with_object(:*).map(&:reduce)
    => [2, 12]
Given the mechanics of this I wouldn't claim it meets a strict definition of point-free, but that's an iterated application of operator-like methods omitting any explicit named/positional argument references.

There are no comments on this comment yet.