Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

minor tewak to p25

  • Loading branch information...
commit 97590c035d2fe28d478f2b9bfec4a927cf3f1456 1 parent 396e332
Jeroen De Dauw authored

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. +5 4 solutions/p25.lua
9 solutions/p25.lua
@@ -7,12 +7,13 @@
7 7 digits = 10
8 8
9 9 function fiboGen()
10   - a, b = 0, 1
  10 + a, b = 1, 0
11 11 return coroutine.wrap(function ()
12 12 while true do
13   - c = a
14   - a, b = b, a + b
15   - coroutine.yield( c )
  13 + coroutine.yield( a )
  14 + b = a + b
  15 + coroutine.yield( b )
  16 + a= a + b
16 17 end
17 18 end)
18 19 end

0 comments on commit 97590c0

Please sign in to comment.
Something went wrong with that request. Please try again.