package formulae

/* ---------------------------------------------------------------- *
 * TYPE FormulaPair, FormulaPairs
 * ---------------------------------------------------------------- */

type FormulaPair struct {
	Pos Formula
	Neg Formula
}

type FormulaPairs []FormulaPair

/* ---------------------------------------------------------------- *
 * Methods for FormulaPairs
 * ---------------------------------------------------------------- */

func NewFormulaPairs(pairs []FormulaPair) FormulaPairs { return pairs }

func (pairs FormulaPairs) Pos() []Formula {
	var fmls = make([]Formula, len(pairs))
	for i, pair := range pairs {
		fmls[i] = pair.Pos
	}
	return fmls
}

func (pairs FormulaPairs) Neg() []Formula {
	var fmls = make([]Formula, len(pairs))
	for i, pair := range pairs {
		fmls[i] = pair.Neg
	}
	return fmls
}
