func New(original bar.Module, n int) (first, rest bar.Module) {
	segments, sink := sink.Value()
	coreModule := core.NewModule(original)
	var once sync.Once
	start := func() {
		once.Do(func() {
			coreModule.Stream(sink)
		})
	}
	first = &module{segments, start, n, true}
	rest = &module{segments, start, n, false}
	return first, rest
}
New splits the output from a module at index n, and returns two modules.
The first module displays segments 0 through n (inclusive), while the second
module displays all remaining segments. One or both of the modules will show
an empty output if there are not enough segments in the original output.
package split  
import (
	"sync"
	"barista.run/bar"
	"barista.run/base/value"
	"barista.run/core"
	"barista.run/sink"
)
type module struct {
	*value.Value
	start func()  
	index int     
	first bool    
}
func (m *module) Stream(sink bar.Sink) {
	go m.start()
	for {
		next := m.Next()
		s, _ := m.Get().(bar.Segments)
		index := m.index
		if index > len(s) {
			index = len(s)
		}
		var out bar.Segments
		if m.first {
			out = s[:index]
		} else {
			out = s[index:]
		}
		sink.Output(out)
		<-next
	}
}