intersection and union of two or more sets written recursively and iteratively