From: "alexeymuranov (Alexey Muranov)" <redmine@ruby-lang.org>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:55047] [ruby-trunk - Feature #6721] Object#yield_self
Date: Sat, 18 May 2013 17:21:55 +0900 [thread overview]
Message-ID: <redmine.journal-39418.20130518172154@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-6721.20120711163521@ruby-lang.org
Issue #6721 has been updated by alexeymuranov (Alexey Muranov).
=begin
It seems that Haskell does not have it: http://stackoverflow.com/questions/4090168/is-there-an-inverse-of-the-haskell-operator
I have found that in the context of Church numerals in lambda calculus, the expression (({λm.λn.nm})) is called (({exp})): http://en.wikipedia.org/wiki/Church_encoding#Computation_with_Church_numerals .
One more reason to use the (({^})) operator as i have suggested :).
This operation also would roughly correspond to (({apply})) in Scheme with reverse order of arguments. If i understand correctly, the (({apply})) in Scheme roughly correspond to (({call})) in Ruby, so maybe (({reverse_call}))?
=end
----------------------------------------
Feature #6721: Object#yield_self
https://bugs.ruby-lang.org/issues/6721#change-39418
Author: alexeymuranov (Alexey Muranov)
Status: Open
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: next minor
=begin
I think the following method is missing from Ruby:
class Object
def yield_self(*args)
yield(self, *args)
end
end
I do not know a good use case, but it looks very natural to me. It can be used in method chains.
What do you think? Is there an alternative?
=end
--
http://bugs.ruby-lang.org/
next prev parent reply other threads:[~2013-05-18 8:48 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 7:35 [ruby-core:46320] [ruby-trunk - Feature #6721][Open] Object#yield_self alexeymuranov (Alexey Muranov)
2012-07-11 9:33 ` [ruby-core:46321] [ruby-trunk - Feature #6721] Object#yield_self jballanc (Joshua Ballanco)
2012-07-11 12:22 ` [ruby-core:46323] " alexeymuranov (Alexey Muranov)
2012-07-14 15:08 ` [ruby-core:46479] " alexeymuranov (Alexey Muranov)
2012-07-14 21:27 ` [ruby-core:46481] " nobu (Nobuyoshi Nakada)
2012-07-14 22:54 ` [ruby-core:46483] " alexeymuranov (Alexey Muranov)
2012-07-15 0:08 ` [ruby-core:46484] " drbrain (Eric Hodel)
2012-07-15 20:10 ` [ruby-core:46498] " alexeymuranov (Alexey Muranov)
2012-08-06 21:15 ` [ruby-core:47027] " trans (Thomas Sawyer)
2012-10-27 15:18 ` [ruby-core:48490] " yhara (Yutaka HARA)
2012-11-10 10:19 ` [ruby-core:49192] " alexeymuranov (Alexey Muranov)
2012-11-18 3:20 ` [ruby-core:49508] " boris_stitnicky (Boris Stitnicky)
2012-11-24 17:28 ` [ruby-core:50047] " headius (Charles Nutter)
2013-02-08 13:41 ` [ruby-core:52035] " alexeymuranov (Alexey Muranov)
2013-02-08 20:11 ` [ruby-core:52044] " Alex aka Sinm
2013-02-09 11:42 ` [ruby-core:52070] " alexeymuranov (Alexey Muranov)
2013-02-18 0:21 ` [ruby-core:52423] " ko1 (Koichi Sasada)
2013-05-17 8:01 ` [ruby-core:55022] " aleph1 (Elias Levy)
2013-05-17 8:48 ` [ruby-core:55023] " Nobuyoshi Nakada
2013-05-17 16:32 ` [ruby-core:55029] " alexeymuranov (Alexey Muranov)
2013-05-17 20:41 ` [ruby-core:55032] " boris_stitnicky (Boris Stitnicky)
2013-05-18 8:21 ` alexeymuranov (Alexey Muranov) [this message]
2013-08-31 20:32 ` [ruby-core:56950] " alexeymuranov (Alexey Muranov)
2013-09-29 11:04 ` [ruby-core:57465] " abinoam (Abinoam P. Marques Jr.)
2015-11-20 18:13 ` [ruby-core:71612] [Ruby trunk " nobu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-39418.20130518172154@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).