enumerate gets a C implementation as a very simple extension of lapply