RosettaCodeData/Task/Fibonacci-sequence/Sidef/fibonacci-sequence-1.sidef

6 lines
88 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
func fib_iter(n) {
2017-09-23 10:01:46 +02:00
var (a, b) = (0, 1)
{ (a, b) = (b, a+b) } * n
return a
2016-12-05 23:44:36 +01:00
}