Fibonacci Numbers |
|
Another circular program - the list nums is defined in terms of itself:
F adds the first two numbers on its input L to form the first element of its output, which in turn becomes part of the input. So, nums is the infinite list of Fibonacci numbers. Note that first and F are quite ordinary functions and could be applied to many other lists. |
|
↑ © L. Allison, www.allisons.org/ll/ (or as otherwise indicated). Created with "vi (Linux)", charset=iso-8859-1, fetched Friday, 19-Apr-2024 02:56:27 UTC. Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off. |