From 3b2e9dd6fbc1d2d17b4ff6b13811f7c382708292 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Fri, 10 Aug 2018 12:15:44 +0200 Subject: [PATCH] Reduction spree in control --- src/core/control.pm6 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/control.pm6 b/src/core/control.pm6 index c1e42ae617c..d2083587200 100644 --- a/src/core/control.pm6 +++ b/src/core/control.pm6 @@ -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 } @@ -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