0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/hogvm/__tests__/recursion.hog
2024-08-30 11:51:36 +02:00

20 lines
354 B
Plaintext

let fibonacci := (number) -> {
if (number < 2) {
return number;
} else {
return fibonacci(number - 1) + fibonacci(number - 2);
}
}
print(fibonacci(6))
fun hogonacci(number) {
if (number < 2) {
return number;
} else {
return hogonacci(number - 1) + hogonacci(number - 2);
}
}
print(hogonacci(6))