> How would you solve this in Python?
The question is how does codeblocks solve this problem in Python, not how does Haskell solve this problem in Haskell.
Hypothetical Python:
times(10, forkIO(forever(block:
...
)))That's not what codeblocks does, though. You use a with statement and a new operator (<<). Then use indentation for the blocks. It doesn't look like you're passing a block to a function. The result is quirky code that will be hard to trace and sort out if you don't already know what's happening.
So this line basically creates a thread pool with 10 threads, all infinitely executing the given code block.
How would you solve this in Python?