develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34342 - trunk/languages/perl6/src/classes

From:
pmichaud
Date:
December 24, 2008 14:21
Subject:
[svn:parrot] r34342 - trunk/languages/perl6/src/classes
Message ID:
20081224222146.9CB0BCBA12@x12.develooper.com
Author: pmichaud
Date: Wed Dec 24 14:21:45 2008
New Revision: 34342

Modified:
   trunk/languages/perl6/src/classes/Object.pir

Log:
[rakudo]:  Fix $x.map to work as list of 1 element.


Modified: trunk/languages/perl6/src/classes/Object.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Object.pir	(original)
+++ trunk/languages/perl6/src/classes/Object.pir	Wed Dec 24 14:21:45 2008
@@ -124,6 +124,17 @@
 .end
 
 
+=item iterator
+
+=cut
+
+.namespace ['Perl6Object']
+.sub 'iterator' :method
+    $P0 = self.'list'()
+    .tailcall $P0.'iterator'()
+.end
+
+
 =item list
 
 Return invocant in list context.  Default is to return a List containing self.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About