Mark J. Reed wrote:
Arity 2 and a 1-elem list seems to be special-cased; otherwise, it
consistently warns once per undefined value in the expansion:

1-elem List reduce patch attached. Test added in r24567

--
Bacek
commit 9c1a3058064067dacab4c5f623a59ae768f19182
Author: Vasily Chekalkin <ba...@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:

Reply via email to