Elems should be unions; also need to impl folds and maps.