Beispiel #1
0
// \==/2
func BuiltinTermNotEquals(m Machine, args []term.Term) ForeignReturn {
	a := args[0]
	b := args[1]
	if !term.Precedes(a, b) && !term.Precedes(b, a) {
		return ForeignFail()
	}
	return ForeignTrue()
}
Beispiel #2
0
// @>=/2
func BuiltinTermGreaterEquals(m Machine, args []term.Term) ForeignReturn {
	a := args[0]
	b := args[1]
	if term.Precedes(b, a) {
		return ForeignTrue()
	}
	return BuiltinTermEquals(m, args)
}
Beispiel #3
0
// @</2
func BuiltinTermLess(m Machine, args []term.Term) ForeignReturn {
	a := args[0]
	b := args[1]
	if term.Precedes(a, b) {
		return ForeignTrue()
	}
	return ForeignFail()
}