From: Roger Pack Date: 2007-10-31T22:41:43+09:00 Subject: Re: new Enumerable.butfirst method ------=_Part_6050_21417566.1193838101803 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline When you do bring it back in, one possible name would be each_except_first(2) Just my $0.02 On 10/31/07, Trans wrote: > > On Oct 30, 2007 8:17 PM, Yukihiro Matsumoto wrote: > > > I just changed with-block form of #take and #drop to #take_while and > > #drop_while respectively. After those change figure becomes > > > > Method block with block without block > > ------------------------------------------------------------------- > > first not allowed not allowed returns array > > take not allowed not allowed returns array > > drop not allowed not allowed returns array > > take_while selects returns array not allowed > > drop_while selects returns array not allowed > > grep iterates returns array returns array > > select selects returns array returns enumerator > > find selects returns element returns enumerator > > > > so that inconsistency reduced much (with exception of #grep). > > How is that less confusing? > > T. > > -- -Roger Pack I like belief. http://www.google.com/search?q=free+bible ------=_Part_6050_21417566.1193838101803 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline When you do bring it back in, one possible name would be
each_except_first(2)
Just my $0.02

On 10/31/07, Trans < transfire@gmail.com> wrote:
On Oct 30, 2007 8:17 PM, Yukihiro Matsumoto < matz@ruby-lang.org> wrote:

> I just changed with-block form of #take and #drop to #take_while and
> #drop_while respectively.  After those change figure becomes
>
> Method         block             with block         without block
> -------------------------------------------------------------------
> first         not allowed     not allowed          returns array
> take          not allowed     not allowed          returns array
> drop          not allowed     not allowed          returns array
> take_while    selects         returns array        not allowed
> drop_while    selects         returns array        not allowed
> grep          iterates        returns array        returns array
> select        selects         returns array        returns enumerator
> find          selects         returns element      returns enumerator
>
> so that inconsistency reduced much (with exception of #grep).

How is that less confusing?

T.




--
-Roger Pack
I like belief. http://www.google.com/search?q=free+bible ------=_Part_6050_21417566.1193838101803--