package main type data struct { dest int source int offset int } func newData(nums ...int) data { return data{dest: nums[0], source: nums[1], offset: nums[2]} } func (d data) transform(start, end int) (int, int) { f := func(x int) int { return x - d.source + d.dest } return f(start), f(end - 1) } var dataMap = map[string][]data{} var identifiers = []string{}