Permalink
Browse files

Parcel.elems should flatten (per TimToady++ at yapc::na 2012).

  • Loading branch information...
pmichaud committed Jun 18, 2012
1 parent 94a8bbe commit e80b1b1240b11eb9b1ab2a662b66f2b4237d598d
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/core/Parcel.pm
View
@@ -28,10 +28,11 @@ my class Parcel does Positional {
$cap
}
- method item() { my $v = self; }
- method flat() { nqp::p6list(nqp::clone($!storage), List, Bool::True) }
- method list() { nqp::p6list(nqp::clone($!storage), List, Mu) }
- method lol() { nqp::p6list(nqp::clone($!storage), LoL, Mu) }
+ method elems() { self.flat.elems }
+ method item() { my $v = self; }
+ method flat() { nqp::p6list(nqp::clone($!storage), List, Bool::True) }
+ method list() { nqp::p6list(nqp::clone($!storage), List, Mu) }
+ method lol() { nqp::p6list(nqp::clone($!storage), LoL, Mu) }
method at_pos(Parcel:D: \$x) is rw { self.flat.at_pos($x); }

0 comments on commit e80b1b1

Please sign in to comment.