An introduction to lockless algorithms
An introduction to lockless algorithms
Posted Mar 5, 2021 0:13 UTC (Fri) by qzPhUZ7af5M6kjJi3tDgMaVq (guest, #140267)In reply to: An introduction to lockless algorithms by Wol
Parent article: An introduction to lockless algorithms
Recursive definitions work just fine in certain programming languages.
https://wiki.haskell.org/The_Fibonacci_sequence
In a Haskell interpreter:
Prelude> let fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
Prelude> fibs !! 100000
(20,899 digit number omitted... it took about 2 seconds to compute it)
