experiment into turning map-sort-grep style transformations inside out