ligo/src/test/contracts/recursion.religo

6 lines
129 B
Plaintext
Raw Normal View History

// Test while loops in PascaLIGO
let rec fibo = (n : int, acc: int): int =>
if (n < 1) {acc;}
else {fibo (n-1,acc+n);};