Casts `array` to a slice if it's needed.

@private
@param {Array} array The array to inspect.
@param {number} start The start position.
@param {number} [end=array.length] The end position.
@returns {Array} Returns the cast slice.
171575
function castSlice(array, start, end) {
      var length = array.length;
      end = end === undefined$1 ? length : end;
      return (!start && end >= length) ? array : baseSlice(array, start, end);
    }
37319
function range(start, stop) {
  if (arguments.length <= 1) {
    stop = start || 0;
    start = 0;
  }

  var length = Math.max(stop - start, 0);
  var idx = 0;
  var arr = new Array(length);

  while(idx < length) {
    arr[idx++] = start;
    start += 1;
  }

  return arr;
}
875517
private static function _createFromArrayWithMinimumHeight(array $array, int $start, int $end): ?IBinaryNode {
        if ($end < $start) {
            return null;
        }
        $middle = (int)(($start + $end) / 2);
        $value = $array[$middle];

        if (null === $value) {
            return null;
        }
        $node = new BinarySearchNode($array[$middle]);
        $leftNode = BinarySearchTree::_createFromArrayWithMinimumHeight($array, $start, $middle - 1);
        $rightNode = BinarySearchTree::_createFromArrayWithMinimumHeight($array, $middle + 1, $end);
        $node->setLeft($leftNode);
        $node->setRight($rightNode);
        return $node;
    }
193406
function concatStreams(array) {
  var concat = new stream.PassThrough();

  function pipe(i) {
    if (i < array.length - 1) {
      array[i].pipe(concat, {end: false});
      array[i].on('end', function () { pipe(i + 1) });
    } else {
      array[i].pipe(concat);
    }
  }
  if (array.length > 0) {
    pipe(0);
  }

  return concat;
}
871034
function slice(args, begin, end) {
  return Array.prototype.slice.call(args, begin, end);
}
907086
function(array, item){
		var idx = array.indexOf(item);
		if(idx>=0){ Array.prototype.splice.call(array, idx, 1);}
	}
1140324
public static Slice wrappedDoubleArray(double[] array, int offset, int length)
    {
        if (length == 0) {
            return EMPTY_SLICE;
        }
        return new Slice(array, offset, length);
    }
33156
public static Object[] subarray(Object[] array, int startIndexInclusive, int endIndexExclusive) {
        int newSize = endIndexExclusive - startIndexInclusive;
        Class<?> type = array.getClass().getComponentType();
        if (newSize <= 0) {
            return (Object[]) Array.newInstance(type, 0);
        }
        Object[] subarray = (Object[]) Array.newInstance(type, newSize);
        System.arraycopy(array, startIndexInclusive, subarray, 0, newSize);
        return subarray;
    }
1110331
function slice (ar, start, end) {
    return Array.prototype.slice.call(ar, start, end)
  }
504185
function locationOf(element, array, start, end) {
  start = start || 0;
  end = end || array.length;
  var pivot = parseInt(start + (end - start) / 2, 10);
  if (end-start <= 1 || array[pivot] === element) return pivot;
  if (array[pivot] < element) {
    return locationOf(element, array, pivot, end);
  } else {
    return locationOf(element, array, start, pivot);
  }
}
1106326
function slice(start, end) {
	    if ($slice !== undefined && end === undefined) return $slice.call(_anObject(this), start); // FF fix
	    var len = _anObject(this).byteLength;
	    var first = _toAbsoluteIndex(start, len);
	    var fin = _toAbsoluteIndex(end === undefined ? len : end, len);
	    var result = new (_speciesConstructor(this, $ArrayBuffer))(_toLength(fin - first));
	    var viewS = new $DataView(this);
	    var viewT = new $DataView(result);
	    var index = 0;
	    while (first < fin) {
	      viewT.setUint8(index++, viewS.getUint8(first++));
	    }return result;
	  }
769689
public static Object[] sub(Object array, int start, int end, int step) {
		int length = length(array);
		if (start < 0) {
			start += length;
		}
		if (end < 0) {
			end += length;
		}
		if (start == length) {
			return new Object[0];
		}
		if (start > end) {
			int tmp = start;
			start = end;
			end = tmp;
		}
		if (end > length) {
			if (start >= length) {
				return new Object[0];
			}
			end = length;
		}

		if (step <= 1) {
			step = 1;
		}

		final ArrayList<Object> list = new ArrayList<>();
		for (int i = start; i < end; i += step) {
			list.add(get(array, i));
		}

		return list.toArray();
	}
154834
function(start, end){
        //subQueue to Array
        if(start >= 0 && start < end && end <= this._length) {
            var result = [],
                current = this._head,
                i = 0;
            while(i++ < start) {
                current = current.next;
            }

            while(start++ < end) {
                var value = current.data.value;
                if(value != null) {
                    result.push(current.data.value);
                }
                current = current.next;
            }

            return result;
        }

        var result = [],
            current = this._head;
        
        while(current){
            result.push(current.data);
            current = current.next;
        }
        
        return result;
    }
1163049
function zrange(key, start, end, withscores, req) {
  var val = this.getKey(key, req);
  if(val === undefined) return [];
  if(typeof withscores === 'object') {
    req = withscores;
    withscores = null;
  }
  return val.zrange(start, end, withscores);
}
248514
function cleanArray(array) {
        var newArray = [];

        for (var i = 0, len = array.length; i < len; i += 1) {
            if (array[i]) {
                newArray.push(array[i]);
            }
        }

        return newArray;
    }
511730
function range(start, end) {
  return Array(end - start + 1).fill().map(function (_, index) {
    return start + index;
  });
}
701201
function slice(v, start, end, step) {
  var r = [];
  var i = void 0;
  if (step > 0) {
    for (i = start; i < end; i += step) {
      r.push(v[i]);
    }
  } else {
    for (i = start; i > end; i += step) {
      r.push(v[i]);
    }
  }
  return r;
}