Permalink
Browse files

lotsa examples

  • Loading branch information...
1 parent 596f4ac commit 35ade46af9d91b35e0d21fad852b27f8170180a7 @substack committed Jul 10, 2012
Showing with 25 additions and 0 deletions.
  1. +10 −0 example/ascend.js
  2. +10 −0 example/min.js
  3. +5 −0 example/rise_mod.js
View
@@ -0,0 +1,10 @@
+var fort = require('../');
+
+var rows = [
+ { x : 5 },
+ { x : 3 },
+ { x : 2 },
+ { x : 9 },
+];
+var res = fort.ascend(rows, function (row) { return row.x });
+console.dir(res);
View
@@ -0,0 +1,10 @@
+var fort = require('../');
+
+var rows = [
+ { x : 5 },
+ { x : 3 },
+ { x : 2 },
+ { x : 9 },
+];
+var r = fort.min(rows, function (row) { return row.x });
+console.dir(r);
View
@@ -0,0 +1,5 @@
+var fort = require('../');
+
+var xs = [ 3, 2, 4, 6, 2, 8, 1, 7 ];
+var res = fort.rise(xs, function (x) { return x % 4 });
+console.dir(res);

0 comments on commit 35ade46

Please sign in to comment.