PasteRack.org
Paste # 42829
2016-02-08 15:12:42

Fork as a new paste.

Paste viewed 62 times.


Embed:

  1. #lang lazy
  2. ;; An infinite list:
  3. (define fibs
  4.   (list* 1 1 (map + fibs (cdr fibs))))
  5.  
  6. ;; Print the 1000th Fibonacci number:
  7. (print (list-ref fibs 1000))

=>

70330367711422815821835254877183549770181269836358732742604905087154537118196933579742249494562611733487750449241765991088186363265450223647106012053374121273867339111198139373125598767690091902245245323403501