ENH use a comprehension over imap