func New[T any](compare func(i, j T) bool, values ...T) *Stack[T] {
	stack := Stack[T]{
		valuesStack: slicestacks.New[T](),
		minMaxStack: slicestacks.New[[]T](),
		compare:     compare,
	}
	stack.Push(values...)
	return &stack
}
// New factory to generate new stacks
New factory to generate new stacks
// New factory to generate new stacks
func New[T any](compare func(i, j T) bool, values ...T) *Stack[T] {
	stack := Stack[T]{
		valuesStack: slicestacks.New[T](),
		minMaxStack: slicestacks.New[[]T](),
		compare:     compare,
	}
	stack.Push(values...)
	return &stack
}
func New [ T any ] ( compare func ( i , j T ) bool , values ... T ) * Stack [ T ] { stack := Stack [ T ] { valuesStack : slicestacks . New [ T ] ( ) , minMaxStack : slicestacks . New [ [ ] T ] ( ) , compare : compare , } stack . Push ( values ... ) return & stack }
New factory to generate new stacks
New factory to generate new stacks