Can be accomplished in a hackish way using apply, but a more structured approach would be nice 7/12/2012: Not sure what I was intending with this one