diff options
Diffstat (limited to 'example/fibo.uwu')
-rw-r--r-- | example/fibo.uwu | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/example/fibo.uwu b/example/fibo.uwu index c3a4aa5..549e048 100644 --- a/example/fibo.uwu +++ b/example/fibo.uwu @@ -1,24 +1,18 @@ -if :bool:if($1, $2, $3) -smaller :int:smaller($1, $2) -equal :int:equal($1, $2) -add :int:add($1, $2) -sub :int:sub($1, $2) - newline " " fibo - if(smaller($1, 0), 0, - if(equal($1, 0), 1, - add( - fibo(sub($1, 1)), - fibo(sub($1, 2)) + bool.if(int.smaller($1, 0), 0, + bool.if(int.equal($1, 0), 1, + int.add( + fibo(int.sub($1, 1)), + fibo(int.sub($1, 2)) ))) print - if(smaller($1, 0), "", - :str:cat( - print(sub($1, 1)), + bool.if(int.smaller($1, 0), "", + str.cat( + print(int.sub($1, 1)), fibo($1), newline )) |