From 4d3668e643f07d49b5cf7e18724aa3180d69d6e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 16 May 2020 13:54:26 +0200 Subject: [PATCH] :white_check_mark: Simplify tail call test --- examples/tail_call.gw | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.43.0