Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
function getPositionInMatrix(needle, haystack, pos) { pos = pos || []; for(var i = haystack.length; --i >= 0;) { if(haystack[i] === needle) { return pos.push(i); } else if(Object.prototype.toString.call(haystack[i]) === '[object Array]') { pos.push(i); if(getPositionInMatrix(needle, haystack[i], pos)) { return pos; } else { pos.pop(); } } } return false; }
This paste will be private.
From the Design Piracy series on my blog: