IIUC, that foldLeft is a flatten.