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 bLt = Functor.bLt
def map = Functor.map
def filter = Functor.filter
def summation = Functor.summation

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