func (q Query) MaxInt() (min int, err error) {
	if q.err != nil {
		err = q.err
		return
	}
	if len(q.values) == 0 {
		return 0, ErrEmptySequence
	}
	_, maxIndex, err := minMaxInts(q.values)
	if err != nil {
		return
	}
	return q.values[maxIndex].(int), nil
}
// MaxInt returns the element with biggest value in the leftmost of the
// sequence. Elements of the original sequence should only be int or
// ErrTypeMismatch is returned. If the sequence is empty ErrEmptySequence is
// returned.
//
// Example:
//	max, err := From([]int{1, -100, 10, 0}).MaxInt() // max is 10
MaxInt returns the element with biggest value in the leftmost of the
sequence. Elements of the original sequence should only be int or
ErrTypeMismatch is returned. If the sequence is empty ErrEmptySequence is
returned.


// MaxInt returns the element with biggest value in the leftmost of the // sequence . Elements of the original sequence should only be int or // ErrTypeMismatch is returned . If the sequence is empty ErrEmptySequence is // returned . // // Example : // max err : = From ( [] int { 1 - 100 10 0 } ) . MaxInt () // max is 10
func (q Query) MaxInt() (min int, err error) {
	if q.err != nil {
		err = q.err
		return
	}
	if len(q.values) == 0 {
		return 0, ErrEmptySequence
	}
	_, maxIndex, err := minMaxInts(q.values)
	if err != nil {
		return
	}
	return q.values[maxIndex].(int), nil
}
func ( q Query ) MaxInt ( ) ( min int , err error ) { if q . err != nil { err = q . err return } if len ( q . values ) == 0 { return 0 , ErrEmptySequence } _ , maxIndex , err := minMaxInts ( q . values ) if err != nil { return } return q . values [ maxIndex ] . ( int ) , nil }
MaxInt returns the element with biggest value in the leftmost of the
sequence.
MaxInt returns the element with biggest value in the leftmost of the sequence .