func (s Seq) Sort() Seq {
	if s.Len() == 0 {
		return s
	}
	values := s.Values()
	sort.Float64s(values)
	return Seq{Array(values)}
}
Sort returns the seq sorted in ascending order.
This fully enumerates the seq.
package chart
import (
	"math"
	"sort"
)
func ValueSequence(values ...float64) Seq {
	return Seq{NewArray(values...)}
}
type Sequence interface {
	Len() int
	GetValue(int) float64
}
type Seq struct {
	Sequence
}
func (s Seq) Values() (output []float64) {
	if s.Len() == 0 {
		return
	}
	output = make([]float64, s.Len())
	for i := 0; i < s.Len(); i++ {
		output[i] = s.GetValue(i)
	}
	return
}
func (s Seq) Each(mapfn func(int, float64)) {
	for i := 0; i < s.Len(); i++ {
		mapfn(i, s.GetValue(i))
	}
}
func (s Seq) Map(mapfn func(i int, v float64) float64) Seq {
	output := make([]float64, s.Len())
	for i := 0; i < s.Len(); i++ {
		mapfn(i, s.GetValue(i))
	}
	return Seq{Array(output)}
}
func (s Seq) FoldLeft(mapfn func(i int, v0, v float64) float64) (v0 float64) {
	if s.Len() == 0 {
		return 0
	}
	if s.Len() == 1 {
		return s.GetValue(0)
	}
	v0 = s.GetValue(0)
	for i := 1; i < s.Len(); i++ {
		v0 = mapfn(i, v0, s.GetValue(i))
	}
	return
}
func (s Seq) FoldRight(mapfn func(i int, v0, v float64) float64) (v0 float64) {
	if s.Len() == 0 {
		return 0
	}
	if s.Len() == 1 {
		return s.GetValue(0)
	}
	v0 = s.GetValue(s.Len() - 1)
	for i := s.Len() - 2; i >= 0; i-- {
		v0 = mapfn(i, v0, s.GetValue(i))
	}
	return
}
func (s Seq) Min() float64 {
	if s.Len() == 0 {
		return 0
	}
	min := s.GetValue(0)
	var value float64
	for i := 1; i < s.Len(); i++ {
		value = s.GetValue(i)
		if value < min {
			min = value
		}
	}
	return min
}
func (s Seq) Max() float64 {
	if s.Len() == 0 {
		return 0
	}
	max := s.GetValue(0)
	var value float64
	for i := 1; i < s.Len(); i++ {
		value = s.GetValue(i)
		if value > max {
			max = value
		}
	}
	return max
}
func (s Seq) MinMax() (min, max float64) {
	if s.Len() == 0 {
		return
	}
	min = s.GetValue(0)
	max = min
	var value float64
	for i := 1; i < s.Len(); i++ {
		value = s.GetValue(i)
		if value < min {
			min = value
		}
		if value > max {
			max = value
		}
	}
	return
}