6 lines
116 B
JavaScript

function isSorted([x, y, ...wow]) {
if (!zs.length) return true
if (y > x) return isSorted(zs)
return false
}