Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created November 23, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/27fc3c595c87614f86ab60127f015037 to your computer and use it in GitHub Desktop.
Save zoffixznet/27fc3c595c87614f86ab60127f015037 to your computer and use it in GitHub Desktop.
use Test;
use MONKEY-GUTS;
sub is-deeply-junction (
Junction $got, Junction $expected, Str:D $desc
) is export {
sub junction-guts (Junction $j) {
my $st = nqp::getattr(nqp::decont($j), Junction, '$!storage');
dd $st.^name;
do for ^$st.elems {
given $st[$_] {
when Junction { junction-guts($_).Slip }
$_
}
}
}
is-deeply junction-guts($got), junction-guts($expected), $desc;
}
constant @a = (2, 3|4, 5, 6|7);
my $sum = @a.reduce: *+*;
# dd $sum;
is-deeply-junction any(any(16, 17), any(17, 18)), $sum, 'tis same';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment