shithub: mc

ref: 9543bdfe516ddde6d347bffed6a99c9ec5c0c40b
dir: /test/fib.myr/

View raw version
use std
/* checks if recursive functions work. should return 21. */
const fib = {n
	if n <= 0
		-> 0
	elif n == 1
		-> 1
	else
		-> fib(n - 1) + fib(n - 2)
	;;
}

const main = {
	std.exit(fib(8))
}