!is.recursive(x) is replaced by  length(x) <= 1 for x is list()