Reimplement map to operate on elements in order, rather than reverse order.