示例#1
0
    def test_std_split(self, x, y):
        y_0 = y[0]
        y_1 = y[1]

        z = split(x)
        z_0 = z[0]
        z_1 = z[1]
        self.assertEqual((y_0.a, y_0.b), (z_0.a, z_0.b))
        self.assertEqual((y_1.a, y_1.b), (z_1.a, z_1.b))
示例#2
0
 def go(gs, acc, size, r0):
     if 0 == len(gs):
         return acc[::-1]
     else:
         g = gs[0]
         gs_1 = gs[1:]
         r1, r2 = split(r0)
         y = g.gen(size, r1)
         acc = [y] + acc
         return go(gs_1, acc, size, r2)
示例#3
0
 def _bind(n, r0):
     r1, r2 = split(r0)
     m_1 = k(m.gen(n, r1))
     return m_1.gen(n, r2)