##     excludePattern <- grep(excludePattern, names(rd))
#          function(x, y, by = 1, all = FALSE, all.x = all, all.y = all,
#                   resolver = intersect, sort = TRUE, suffixes = c(".x",".y"))

inds <- structure(seq(length(X)), names = names(X))
ans <- try(do.call(c, unname(lapply(X, FUN, ...))), silent = TRUE)
if (inherits(ans, "try-error") || (class(ans) != class(X)))
stop("'FUN' did not produce an endomorphism")
ans <- iteratorFun(inds, forEachSpace, simplify = simplify)
else ans <- iteratorFun(inds, forEachSpace)
ans <- do.call(reducerFun, c(list(ans), reducerParams))
reserved <- c("ranges", "start", "end", "width", "space")
nD <- length(del <- setdiff(colnames(data), (nl <- names(l))))

### Selection of features and columns by intervals and column names
"'colnames' must be a character vector without missing values"

representation(ranges = "RangesList", colnames = "character"))
function(x, do.NULL = TRUE, prefix = "col") x@colnames)
RangedSelection <- function(ranges = RangesList(), colnames = character()) {
stop("'colnames' must be a character vector without missing values")
new("RangedSelection", ranges = ranges, colnames = colnames)

### Ranges is a virtual class that serves as the base for all range containers
### Conceptually Ranges are closed, one-dimensional intervals with integer end
### points and on the domain of integers.
### The Ranges API (work still very much in progress):
###     start<-, width<-, end<-, names<-
### Without this definition, we inherit the method for Vector objects
### which is very inefficient on Ranges objects!
### The "start" and "end" generics are defined in the stats package.
### The 3 default methods below provide a formalization of the relationship
### between the starts/widths/ends of a Ranges object. Of course Ranges
### subclasses need to implement at least 2 of them!
### Note that when width(x)[i] is 0, then end(x)[i] is start(x)[i] - 1
### S3/S4 combo for as.data.frame.Ranges
### A Ranges object is considered empty iff all its ranges are empty.
### TODO: "extractROWS" and most of the Ranges endomorphisms are only
### defined for IRanges objects. Need to fix up the update mechanism, so that
### they can be defined on Ranges. "extractROWS" and other endomorphisms
### are currently implemented as wrappers that coerce to IRanges, which is not
### efficient so not a general, long-term solution.