aboutsummaryrefslogtreecommitdiff
path: root/solutions/fibonacci.slip
blob: 29d0437b02d0c9c734d7c2524a980e0dfa99d5cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(let fibonacci (fix
	(fn fib' (Int -> Int) (Int -> Int)
		(fn n Int Int
			(case n
				(1 0)
				(2 1)
				(n
					(+ (fib' (-- n)) (fib' (- n 2)))
				)
			)
		)
	)
))