Did I find the right examples for you? yes no

All Samples(4)  |  Call(0)  |  Derive(0)  |  Import(4)

src/d/a/dao-HEAD/dao/tests/testeval.py   dao(Download)
  def test_letrec_fac(self):
    from util import m, n, fac
    eq_(eval(letrec([(fac, lamda([n], if_(eq(n,1), 1, mul(n, fac(sub(n, 1))))))],
                  fac(3))), 6)
 
  def test_letrec_odd_even(self):
    from util import n, odd, even  
  def test_letrec_fac(self):
    from util import m, n
    fac = MacroVar('fac')
    eq_(eval(letrec([(fac, macro([n], if_(eq(n,1), 1, mul(n, fac(sub(n, 1))))))],
                  fac(3))), 6)
 
  def test_letrec_odd_even(self):
    from util import n