Implement igroupBy imapKeys and ifindIf