The Haskell programming language does not have a looping co…

Twetch ·

The Haskell programming language does not have a looping construct. Does this mean Haskell is not "Turing Complete" ? Of course not !

Replies

Twetch ·

To iterate over a data structure in Haskell one uses recursion. A specific form of recursion, called tail-recursion is possible with Bitcoin Script.

Twetch ·

To implement tail recursion in Bitcoin Script you have to 1) unroll your loops 2) use the ALT_STACK to pass input to the next unrolled iteration.