function bifurcateEntries( x, filter ) {
	var xget;
	var gget;
	var len;
	var out;
	var g;
	var v;
	var i;

	// Get the number of elements to group:
	len = x.length;
	if ( filter.length !== len ) {
		throw new RangeError( 'invalid argument. The first and second arguments must have the same length.' );
	}
	if ( len === 0 ) {
		return [];
	}
	// Resolve accessors for retrieving array elements:
	xget = resolveGetter( x );
	gget = resolveGetter( filter );

	// Loop over the elements and assign each to a group...
	out = [ [], [] ];
	for ( i = 0; i < len; i++ ) {
		v = xget( x, i );
		g = gget( filter, i );
		if ( g ) {
			out[ 0 ].push( [ i, v ] );
		} else {
			out[ 1 ].push( [ i, v ] );
		}
	}
	return out;
}
Splits array element entries into two groups.

@param {Collection} x - input array
@param {Collection} filter - array indicating which group an element in the input array belongs to
@throws {RangeError} must provide arrays having the same length
@returns {ArrayArray} results

@example
var x = [ 'beep', 'boop', 'foo', 'bar' ];
var filter = [ true, true, false, true ];

var out = bifurcateEntries( x, filter );
// returns [ [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], [ [ 2, 'foo' ] ] ]