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
Something is inconsistent with the undef warnings of .reduce #524
Comments
From @masak<moritz_> rakudo: say (1..10).reduce({$^a + |
From @markjreedArity 2 and a 1-elem list seems to be special-cased; otherwise, it (1..4).reduce({$^a+$^b+$^c+$^d}) # no warnings On Mon, Dec 22, 2008 at 10:11 AM, via RT Carl Mäsak
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @markjreedOk, so with that patch, the case of a 1-element list and a binary sub I'd still like to see the undef warnings reduced to one, rather than On Mon, Dec 22, 2008 at 4:17 PM, Vasily Chekalkin <bacek@bacek.com> wrote:
-- |
From @bacekMark J. Reed wrote:
1-elem List reduce patch attached. Test added in r24567 -- |
From @baceklist_reduce.patchcommit 9c1a3058064067dacab4c5f623a59ae768f19182
Author: Vasily Chekalkin <bacek@bacek.com>
Date: Tue Dec 23 08:12:19 2008 +1100
Fix one element List reduce
diff --git a/languages/perl6/src/builtins/any-list.pir b/languages/perl6/src/builtins/any-list.pir
index eaa43c8..8761297 100644
--- a/languages/perl6/src/builtins/any-list.pir
+++ b/languages/perl6/src/builtins/any-list.pir
@@ -410,7 +410,6 @@ the size of that file down and to emphasize their generic,
unless iter goto empty
retv = shift iter
loop:
- unless iter goto done
# Create arguments for closure
args = new 'ResizablePMCArray'
@@ -432,6 +431,7 @@ the size of that file down and to emphasize their generic,
invoke:
retv = expression(retv, args :flat)
+ unless iter goto done
goto loop
empty:
|
From sohtil@gmail.comCurrent rakudo refuses to reduce with non-binary functions: $ ./perl6
This is Rakudo Perl 6, version 2010.08-119-gccde8dc built on parrot Lithos |
From @pmichaudSince 'reduce' is now defined only on arity-2 functions, marking this Pm |
@pmichaud - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#61610 (status was 'rejected')
Searchable as RT61610$
The text was updated successfully, but these errors were encountered: