ligo/src/test/contracts/recursion.religo

6 lines
134 B
Plaintext
Raw Normal View History

// Test while loops in PascaLIGO
2020-03-07 02:54:57 +01:00
let rec fibo = ((n, acc) : (int,int)): int =>
if (n < 1) {acc;}
2020-03-07 02:54:57 +01:00
else {fibo ((n-1,acc+n));};