3 ms·
Sorry, apparently there was a "true" implementation in Haskell in one of the answers, though I am not sure how the lazy evaluation of Haskell is handled. https
by suprtx 1y ago
Sorry, apparently there was a "true" implementation in Haskell in one of the answers, though I am not sure how the lazy evaluation of Haskell is handled.
https://stackoverflow.com/a/7719971 https://stackoverflow.com/a/7719971
You can see that the Haskell code is more verbose than the C code.