Ejemplo n.º 1
0
 def test_parallel(self):
     """***"""
     prog =  Arrow().parallel(lambda n: n+1, lambda n: n+2)
     prog.post(list)
     self.assertEquals([2, 4], prog([1, 2]))
Ejemplo n.º 2
0
 def test_precomputation(self):
     arr = Arrow(map_arr, lambda n: n+1)
     larger2arr = arr.post(filter_arr, lambda n: n>2)
     self.assertEquals([3,4,5,6,7, 8], larger2arr([1,2,3,4,5,6,7]))