Great question!
Re-reading the documentation, I didn't find anything on point. (But I'm sure glad I did--found features I should be using, like the compound assignment operator %<>%.)
Interactively, what I do is to build maggies(?) interactively a length at a time, which generous use of the up arrow to go back to the last one that worked. I suppose it wouldn't be too hard to wrap functions using the operator that created, then cached, segments sequentially named in a data frame or other suitable structure to prevent namespace pollution.