Abstracted unique and cataM to work on foldables.