Skip to content

Commit

Permalink
Reduction spree in control
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 10, 2018
1 parent f121de3 commit 3b2e9dd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/control.pm6
Expand Up @@ -21,11 +21,11 @@ sub THROW-NIL(int $type --> Nil) {
}

sub RETURN-LIST(Mu \list) is raw {
my Mu $storage := nqp::getattr(list, List, '$!reified');
nqp::isgt_i(nqp::elems($storage),1)
my \reified := nqp::getattr(list, List, '$!reified');
nqp::isgt_i(nqp::elems(reified),1)
?? list
!! nqp::elems($storage)
?? nqp::shift($storage)
!! nqp::elems(reified)
?? nqp::shift(reified)
!! Nil
}

Expand Down Expand Up @@ -219,9 +219,9 @@ sub CLONE-HASH-DECONTAINERIZED(\hash) {
}

sub CLONE-LIST-DECONTAINERIZED(*@list) {
my Mu $list-without := nqp::list();
nqp::push($list-without, nqp::decont(~$_)) for @list.eager;
$list-without;
my Mu \list-without := nqp::list();
nqp::push(list-without, nqp::decont(~$_)) for @list.eager;
list-without;
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 3b2e9dd

Please sign in to comment.