code: function filterInPlace(a, fn, ctxt) {
    for (var i = 0; i < a.length; i++) {
      if (!fn.call(ctxt, a[i], i, a)) {
        a.splice(i--, 1);
      }
    }
    return a;
  }
docs: Filter an array in place, based on predicate with same signature as `Array#filter`.