Haskell: TVar: orElse
-
30-05-2021 - |
Solution
If you have
orElse a b
then b
is only run if retry
is called explicitly in a
. Otherwise orElse
would essentially become nondeterministic. (The rerunning of transactions that is done by the STM runtime is transparent and should not effect the outcome of any computation.)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow