package extras

/**
 *  Find the sum of all the elements in a list. The list comprises
 *    sub-lists of length two. All the values in these sub-lists are
 *    summed.
 */

import fp.*

def map = Functor.map
//def rGt = Functor.rGt
def bLt = Functor.bLt
//def bAnd = Functor.bAnd
//def bComposition = Functor.bComposition
def filter = Functor.filter
//def zipWith = Functor.zipWith
//def bAdd = Functor.bAdd
def summation = Functor.summation

def ex = [[2, 3], [2, 1], [7, 8]]
def res = map(summation, filter(bLt, ex))
println "res: ${res}"
