1 2 3 4 5 6 7 8 9 10 11 12
let n = 1000 let a = 0.0 let b = 1.0 let i = 0 while i < n { let tmp = a + b set a = b set b = tmp set i = i + 1 } a