Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec] Add two tests for lazy triangle reduce.

git-svn-id: http://svn.pugscode.org/pugs@30291 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 09a80e6498dfc333832ac2292054678c9e3c968b 1 parent 0e61dff
colomon authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 S03-metaops/reduce.t
View
7 S03-metaops/reduce.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 81;
+plan 83;
=begin pod
@@ -186,6 +186,11 @@ is( ([<] 42), Bool::True, "[<] 42 returns true");
is( ~([\<] 42), "1", "[\<] 42 returns '1'");
ok( ([\<] 42) ~~ Iterable, "[\<] 42 returns something Iterable");
+is( ([\*] 1..*).batch(10).join(', '), '1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800',
+ 'triangle reduce is lazy');
+is( ([\R~] 'a'..*).batch(8).join(', '), 'a, ba, cba, dcba, edcba, fedcba, gfedcba, hgfedcba',
+ 'triangle reduce is lazy');
+
# RT #65164 (TODO: implement [^^])
#?rakudo skip 'implement [^^]'
{
Please sign in to comment.
Something went wrong with that request. Please try again.