package extras;

/**
 *  The function disjoint tests whether two lists
 *    have no elements in common. This is implemented
 *    with nested evaluation of method every. In effect
 *    disjoint tests for all x in list1 and all y in list2,
 *    x != y.
 */

import fp.*

	// alias
def bAdd = Functor.bAdd
def bAnd = Functor.bAnd
def bOr = Functor.bOr
def lFold = Functor.lFold
def rFold = Functor.rFold

println "AND: ${rFold(bAnd, true, [false, true, false])}"
println "OR: ${rFold(bOr, true, [false, true, false])}"
println "ADD: ${rFold(bAdd, '', ['Hello ', 'Ken'])}"
