func (p *pipeline) addSector(outer, inner string) string {
	if inner == "" {
		return outer  
	}
	code := strings.Replace(outer, "#next", inner, 1)
	code = strings.Replace(code, "#e", "e"+strconv.Itoa(p.en), -1)
	if strings.Contains(code, "#+e") {
		p.en++
		code = strings.Replace(code, "#+e", "e"+strconv.Itoa(p.en), -1)
	}
	code = strings.Replace(code, "#k", "k"+strconv.Itoa(p.kn), -1)
	if strings.Contains(code, "#+k") {
		p.kn++
		code = strings.Replace(code, "#+k", "k"+strconv.Itoa(p.en), -1)
	}
	return code
}
addSector replaces the #next directive in outer with inner. It also sets
the value of #k and #e variable directives.
package codegen
import (
	"go/ast"
	"strconv"
	"strings"
	"github.com/lukechampine/ply/types"
)
type transformation struct {
	recv string
	params []string
	ret string
	outline string
	setup string
	loop string
	op string
	cons string
	typeFn func(*ast.SelectorExpr, []ast.Expr, map[ast.Expr]types.TypeAndValue) []types.Type
}
func (t transformation) specify(call *ast.CallExpr, nargs int, exprTypes map[ast.Expr]types.TypeAndValue) transformation {
	s := t
	s.params = append([]string(nil), t.params...)
	templs := []*string{&s.recv, &s.ret, &s.outline, &s.setup, &s.loop, &s.op, &s.cons}
	for i := range s.params {
		templs = append(templs, &s.params[i])
	}
	typs := s.typeFn(call.Fun.(*ast.SelectorExpr), call.Args, exprTypes)
	for _, templ := range templs {
		for i, typ := range typs {
			typVar := 'T' + byte(i)  
			*templ = strings.Replace(*templ, "#"+string(typVar), typ.String(), -1)
		}
		for i := range call.Args {
			*templ = strings.Replace(*templ, "#arg"+strconv.Itoa(i+1), "__plyarg_"+strconv.Itoa(i+nargs), -1)
		}
		*templ = strings.TrimSpace(*templ)
	}
	return s
}
var safePipeName = func() func() string {
	count := 0
	return func() string {
		count++
		return "__plypipe_" + strconv.Itoa(count)
	}
}()
type pipeline struct {
	kn  int  
	en  int  
	fns []*ast.CallExpr
	ts  []transformation
}