func (t *Template) NextMap(name string) drmaa2interface.JobTemplate {
	t.Next()
	return t.MapTo(name)
}
NextMap applies all registered Iterators to the internal job template
and finally does a temporary mapping of the job template with the
mapping function specified.
package wfl
import (
	"github.com/dgruber/drmaa2interface"
	"github.com/mitchellh/copystructure"
)
type Template struct {
	Jt        drmaa2interface.JobTemplate
	iterators map[string]Iterator
	mappers   map[string]Iterator
}
type Iterator func(drmaa2interface.JobTemplate) drmaa2interface.JobTemplate
func NewTemplate(jt drmaa2interface.JobTemplate) *Template {
	return &Template{Jt: jt,
		iterators: make(map[string]Iterator, 16),
		mappers:   make(map[string]Iterator, 16)}
}
func (t *Template) AddIterator(name string, itr Iterator) *Template {
	t.iterators[name] = itr
	return t
}
func (t *Template) Next() drmaa2interface.JobTemplate {
	for _, iter := range t.iterators {
		t.Jt = iter(t.Jt)
	}
	return t.Jt
}