if (!is.na(x_min))  # success means 'x' contains no NAs
if (!is.na(x_min)) {  # success means 'x' contains no NAs and no NaNs
if (x_min == x_max)  # both are Inf or both are -Inf

### List objects are Vector objects with "[[", "elementType" and
## From here, 'length(x)' is guaranteed to be != 0
## We must return a named integer(0) if 'x' is named
"isEmpty() is not defined for objects of class "
### A List object is considered empty iff all its elements are empty.
### Value for elementMetadata slot can be passed either with
### The latter is the new recommended form.
" must extend SimpleList or CompressedList"
### Assumes 'x' and 'i' are parallel List objects (i.e. same length).
### Returns TRUE iff 'i' contains non-NA positive values that are compatible
### Returns the name of one of the 3 supported fast paths ("LL", "NL", "RL")
## LEPType (List Element Pseudo-Type): same as "elementType" except for
## 'i' is a List of logical vectors or logical-Rle objects.
## We select the "LL" fast path ("Logical List").
## 'i' is a List of numeric vectors or numeric-Rle objects.
## We select the "NL" fast path ("Number List").
## We select the "RL" fast path ("Ranges List").
### Truncate or recycle each list element of 'i' to the length of the
## FIXME: This is rough and doesn't follow exactly the truncate-or-recycle
## semantic of normalizeSingleBracketSubscript() on a logical vector or
### Assumes 'x' and 'i' are parallel List objects (i.e. same length),
### and 'i' is a List of logical vectors or logical-Rle objects.
### and 'i' is a List of numeric vectors or numeric-Rle objects.
### and 'i' is a List of Ranges objects.
### Fast subset by List of logical vectors or logical-Rle objects.
### Fast subset by List of numeric vectors or numeric-Rle objects.
### Fast subset by List of Ranges objects.
### Subset a List object by a list-like subscript.
"cannot subscript an unnamed list-like object "
## From here, 'x' and 'i' are guaranteed to have the same length.
## Slow path (loops over the list elements of 'x').
"number of values supplied is not a sub-multiple "
"of the number of values to be replaced"
## Surprisingly, in that case, `[<-` on standard vectors does not
## even look at 'value'. So neither do we...
"when list-like subscript is unnamed, it must have the "
"cannot subset an unnamed list-like object "
"list-like subscript has duplicated names"
## '...' is either empty or contains only the 'exact' arg.
### See R/List-comparison.R for the details.
"all objects in ... should be a vector or 'List'"
## elementLengths uses NROW, inappropriate
"all object lengths must be multiple of longest object length"
### This method explains the concept of revElements() but is NOT efficient
### because endoapply() loops over the elements of 'i'.
### There is a fast method for CompressedList objects though.
"cannot convert to environment when names are NULL"
## Special cased, because integer extends ANY (somehow) and numeric,
## so ambiguities are introduced due to method caching.
### NOT exported. Assumes 'names1' is not NULL.
## This is consistent with base::unlist but is not consistent
## with unlist,CompressedList. See comments and FIXME note in
## the unlist,CompressedList code for more details.
## cannot use active bindings here, as they break for replacement