Skip to content

Commit

Permalink
Make deepmap actually recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Aug 22, 2015
1 parent a519305 commit 0ca6b57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/metaops.pm
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,13 @@ multi sub deepmap(\op, \obj) {
nqp::stmts(
($result := &!block($value)),
nqp::if(
nqp::istype($result, Slip), # GLR add code handling Iterable here
nqp::istype($result, Iterable),
nqp::stmts(
($result := deepmap(op, $result))
)
),
nqp::if(
nqp::istype($result, Slip),
nqp::stmts(
($result := self.start-slip($result)),
nqp::if(
Expand Down

0 comments on commit 0ca6b57

Please sign in to comment.