support SpreadElement in destructuring - fixes #128

This commit is contained in:
Sebastian McKenzie
2014-11-07 20:46:02 +11:00
parent b3206d94a6
commit f8e8cd3979
3 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
var isSorted = ([x, y, ...wow]) => {
if (!zs.length) return true
if (y > x) return isSorted(zs)
return false
};

View File

@@ -0,0 +1,11 @@
"use strict";
var isSorted = function (_ref) {
var x = _ref[0];
var y = _ref[1];
var wow = _ref.slice(2);
if (!zs.length) return true;
if (y > x) return isSorted(zs);
return false;
};