implicit: Int -> Category
Sep. 18th, 2010 07:27 pm(that's scala)
/**
* Builds a category out of a segment of integers between 0 and n (not included).
*
* @param n number of elements
* @return a new category
*/
implicit def segment(n:Int) : Category[Int, (Int, Int)] = Category(PoSet.range(0, n, 1))
//...
def testImplicitSegment {
def sut: Category[Int, (Int, Int)] = 3
assertEquals(_3_, sut)
}