Apply an action to a set of data serially.