New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce with numeric ops does not numify things if only one arg is passed ([*] set(1,2,3)) #5495
Comments
From @AlexDanielCode: Result: OK, that ↑ makes sense. Code: Result: Huh? I expected 3. Related: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=128757 (single arg thing does not really work with +) |
From @lizmatHmmm…. in RT #128757 you expect a single value to return identity, and here you expect it not to return it? By the same reasoning that [/] “hello” returns “hello”, I think [*] set(1,2,3) should return set(1,2,3). Or am I missing something?
|
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Wed Jul 27 14:38:42 2016, elizabeth wrote:
I don't think you're missing anything; but I do think there's a really strong case that [*] should numify its arguments, even if there's only one. In #128757 my impression of the OP's ticket was that a pattern was established by [*], [/], and [-] that [+] didn't follow that pattern (it was inconsistent)... not that the "return identity" behavior was the correct/desired one. Pm |
From @AlexDanielOn 2016-07-27 14:38:42, elizabeth wrote:
Yes, you are right. A fix that will make it numify everything will solve both tickets (probably?). |
From @MasterDuke17On Wed Jul 27 15:03:26 2016, alex.jakimenko@gmail.com wrote:
Seems to be fixed now: |
From @AlexDanielYeah, seems so. Marking as testneeded. It would be nice to know when exactly it was fixed, but bisectable is down. Eh. On 2016-10-02 15:05:24, ddgreen@gmail.com wrote:
|
From @AlexDanielOn 2016-10-02 18:18:12, alex.jakimenko@gmail.com wrote:
Ah, bisectable is now up. It is this: rakudo/rakudo@b1c444f |
From @moritzTests added: https://rt-archive.perl.org/perl6//Public/Bug/Display.html?id=128758 |
@moritz - Status changed from 'open' to 'resolved' |
From @smlsIt looks like this bug hasn't been *completely* fixed: dd &infix:<+>( "2" ); # 2 dd [*] "2"; # 2 dd reduce &infix:<*>, "2"; # 2 i.e. it doesn't work when using the + operator with the functional form of reduce, even though it works with other numeric operators and with the meta-operator form. |
@smls - Status changed from 'resolved' to 'open' |
From @dogbert17On Thu, 29 Jun 2017 12:50:43 -0700, smls75@gmail.com wrote:
Last example fixed with commit (2018-01-13) rakudo/rakudo@0af3f4d |
From @dogbert17On Sun, 25 Mar 2018 08:43:30 -0700, jan-olof.hendig@bredband.net wrote:
Test added with commit Raku/roast@6b0fcc2 |
@dogbert17 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128758 (status was 'resolved')
Searchable as RT128758$
The text was updated successfully, but these errors were encountered: