Permalink
Browse files

fix List.tree

it got broken by the last API change of MapIter.new
  • Loading branch information...
1 parent e09fbe6 commit cd3194724311bbf7c52e9aba76522e19d8103cda @moritz moritz committed Jul 22, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/core/List.pm
View
7 src/core/List.pm
@@ -39,14 +39,15 @@ my class List does Positional {
proto method tree(|$) {*}
multi method tree(List:U:) { self }
multi method tree(List:D:) {
- MapIter.new(:list(self), :block(&itemify)).list;
+ MapIter.new(self, &itemify, Mu).list;
}
multi method tree(List:D: Cool $count as Int) {
$count <= 0 ?? self
!! $count == 1 ?? self.tree
!! MapIter.new(
- :list(self),
- :block({.elems == 1 ?? $_ !! [.tree($count - 1)]})
+ self,
+ {.elems == 1 ?? $_ !! [.tree($count - 1)]},
+ Mu
).list;
}
multi method tree(List:D: &c) {

0 comments on commit cd31947

Please sign in to comment.