File tree Expand file tree Collapse file tree
unpythonic/dialects/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ def factorial(n):
4646assert factorial(4 ) == 24
4747factorial(5000 ) # no crash
4848
49- t = letrec[(( evenp, lambda x : (x == 0 ) or oddp(x - 1 )),
50- ( oddp, lambda x : (x != 0 ) and evenp(x - 1 ))) in
49+ t = letrec[[ evenp << ( lambda x : (x == 0 ) or oddp(x - 1 )),
50+ oddp << ( lambda x : (x != 0 ) and evenp(x - 1 ))] in
5151 evenp(10000 )]
5252assert t is True
5353
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ def f(k, acc):
101101 #
102102 # With `mcpyrate` this shouldn't matter, but we're keeping the example.
103103 with testset ("autonamed letrec lambdas, multiple-expression let body" ):
104- t = letrec [(( evenp , lambda x : (x == 0 ) or oddp (x - 1 )), # noqa: F821
105- ( oddp , lambda x :(x != 0 ) and evenp (x - 1 ))) in # noqa: F821
104+ t = letrec [[ evenp << ( lambda x : (x == 0 ) or oddp (x - 1 )), # noqa: F821
105+ oddp << ( lambda x :(x != 0 ) and evenp (x - 1 ))] in # noqa: F821
106106 [local [x << evenp (100 )], # noqa: F821, multi-expression let body is a do[] environment
107107 (x , evenp .__name__ , oddp .__name__ )]] # noqa: F821
108108 test [t == (True , "evenp" , "oddp" )]
You can’t perform that action at this time.
0 commit comments