const rdl = require("../lib/index");
const n = require("frink");
const op = require("rxjs/operators");

const time = hrtime => {
	const nanoseconds = (hrtime[0] * 1e9) + hrtime[1];
	const milliseconds = nanoseconds / 1e6;
	const seconds = nanoseconds / 1e9;

	return {
		seconds,
		milliseconds,
		nanoseconds
	};
};
const q = "subsequence(for-each(interval(50),{$1 + 1}),1,10)";
const s = process.hrtime();
//rdl.parseString(q,{rdl:0})
op.switchMap(rdl.runString(q))(rdl.prepare(n))
	.subscribe({
		next(x) {
			console.log(x);
		},
		complete() {
			console.log(time(process.hrtime(s)));
		}
	});

@@ -95,16 +95,43 @@
 ators%22);
+%0Aconst l3 = require(%22l3n%22);
 %0A%0Aconst 
@@ -351,91 +351,163 @@
 q = 
-%22subsequence(for-each(interval(50),%7B$1 + 1%7D),1,10)%22;%0Aconst s = process.hrtime();%0A//
+%60l3:traverse(l3:e(root,for-each(subsequence(interval(1000),0,3),%7Bl3:e(a,$1)%7D)))%0A%60;%0Aconst s = process.hrtime();%0A//l3.toVNodeStreamCurried(%7BwithAttrs:true%7D)(
 rdl.
@@ -528,16 +528,17 @@
 %7Brdl:0%7D)
+)
 %0Aop.swit
@@ -610,21 +610,88 @@
 %0A%09%09%09
-console.log(x
+//if(x.type == 17) console.log(JSON.stringify(x.node.node));%0A%09%09%09console.log(x+%22%22
 );%0A%09
@@ -708,24 +708,26 @@
 lete() %7B%0A%09%09%09
+//
 console.log(

test async construction