2
votes
Vote UpVote

Fibonacci Numbers the Weird Way

The Delphi Geek – Yanniel recently posted two ways to generate Fibonacci numbers, here are two more. Generating Fibonacci numbers with an enumerator for i in Fibonacci(10) do Writeln(i); Of course you need a Fibonacci-implementing enumerator. I wrote one on 2007 and it uses the iterative approach. Read more in my old article Fun with enumerators, part 6 – generators.Generating Fibonacci numbers with anonymous methodsThis one was prepared for ITDevCon 2011 as an example of tricky (but pretty much useless) example of what can be done using anonymous methods. var fib: TFunc<integer>;begin fib := ...
Favorite? Off-Topic? gabr @ 2011-12-01 13:40

Statistics

Visits: 618
Votes: 2
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alberto
Yanniel
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)