implement scratch each, map, sort_by, select, and reduce/inject, with tests