From: Jérémie Astor Date: Sat, 16 May 2020 11:54:26 +0000 (+0200) Subject: :white_check_mark: Simplify tail call test X-Git-Tag: nightly~1564 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=4d3668e643f07d49b5cf7e18724aa3180d69d6e8;p=gwion.git :white_check_mark: Simplify tail call test --- diff --git a/examples/tail_call.gw b/examples/tail_call.gw index 0a595ebd..fbbf9d5e 100644 --- a/examples/tail_call.gw +++ b/examples/tail_call.gw @@ -1,8 +1,8 @@ fun void test(int i) { - if(i == 2)return; -#! if(i == 0)return; -<<< i >>>; - return test(--i + 3 - 4); + if(!i) + return; + <<< i >>>; + return test(--i); } -test(6); +test(3);