Returns a list with the first n Fibonacci numbers
(self, n)
| 29 | return [ self.nth(i) for i in range(k, n + 1) ] |
| 30 | |
| 31 | def first(self, n): |
| 32 | """Returns a list with the first n Fibonacci numbers""" |
| 33 | g = self.generator(n) |
| 34 | return [ g.next() for i in range(n) ] |
| 35 | |
| 36 | def unboundedGenerator(self): |
| 37 | """Unbounded Fibonacci generator""" |
no test coverage detected