QUnit.test("window()", function(assert)
{
	function sum(unpacker)
	{
		return function(rows, begin, end, current)
		{
			return Canal.of(rows, begin, end) //
			.unpack(unpacker) //
			.reduce(function(a, b)
			{
				return a + b;
			}).get();
		};
	}

	var result = Canal.of([
		{"id":1,"sex":1,"grp":0,"sal":3032},
		{"id":2,"sex":1,"grp":1,"sal":2153},
		{"id":3,"sex":2,"grp":0,"sal":2545},
		{"id":4,"sex":1,"grp":1,"sal":1894}
	]).toRows().window(
		Canal.item(sum(function(d){return d.id;}))
			.partBy(function(d){return d.grp;})
			.orderBy(function(d){return d.sex;}),
		Canal.item(sum(function(d){return d.sal;}))
			.partBy(function(d){return d.grp;}, function(d){return d.sex;})
	).collect();

	assert.propEqual(result, [
		[{"id":1,"sex":1,"grp":0,"sal":3032}, 1, 3032],
		[{"id":3,"sex":2,"grp":0,"sal":2545}, 4, 2545],
		[{"id":2,"sex":1,"grp":1,"sal":2153}, 6, 4047],
		[{"id":4,"sex":1,"grp":1,"sal":1894}, 6, 4047]
	]);
});

@@ -684,16 +684,205 @@
 d.sex;%7D)
+,%0A%09%09Canal.item(sum(function(d)%7Breturn d.sal;%7D))%0A%09%09%09.partBy(function(d)%7Breturn d.grp;%7D)%0A%09%09%09.orderBy(function(d)%7Breturn d.sal;%7D)%0A%09%09%09.between(null,0)  // From the very first row to current row
 %0A%09).coll
@@ -922,25 +922,28 @@
  %5B%0A%09
-%09
+    
 %5B%7B%22id%22:
-1
+3
 ,%22sex%22:
-1
+2
 ,%22gr
@@ -957,22 +957,28 @@
 al%22:
-3032%7D, 1, 3032
+2545%7D, 4, 2545, 2545
 %5D,%0A%09
@@ -981,33 +981,33 @@
 %5D,%0A%09%09%5B%7B%22id%22:
-3
+1
 ,%22sex%22:
-2
+1
 ,%22grp%22:0,%22sa
@@ -1009,30 +1009,36 @@
 0,%22sal%22:
-2545%7D, 4, 2545
+3032%7D, 1, 3032, 5577
 %5D,%0A%09%09%5B%7B%22
@@ -1037,25 +1037,25 @@
 %5D,%0A%09%09%5B%7B%22id%22:
-2
+4
 ,%22sex%22:1,%22gr
@@ -1065,20 +1065,20 @@
 1,%22sal%22:
-2153
+1894
 %7D, 6, 40
@@ -1079,16 +1079,22 @@
  6, 4047
+, 1894
 %5D,%0A%09%09%5B%7B%22
@@ -1089,33 +1089,33 @@
 1894%5D,%0A%09%09%5B%7B%22id%22:
-4
+2
 ,%22sex%22:1,%22grp%22:1
@@ -1117,32 +1117,38 @@
 rp%22:1,%22sal%22:
-1894%7D, 6
+2153%7D, 6, 4047
 , 4047%5D%0A%09%5D);

Update the test case.