You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it's not exactly a bug, but I did lose like 5 minutes puzzling over it because I couldn't see how the code produced the wanted behavior—in fact, it doesn't! The machine does not vend the juice once there's 0 remaining and then reset the cost to 50; it vends it once you insert a coin after there's 0 remaining, resets it to 50, and then credits the new coin. This does produce the behavior of vending after every 5 coins (except for the first time, which requires 6), but it's still a confusing example.
This example is incorrect:
reactive-banana/reactive-banana/src/Reactive/Banana/Combinators.hs
Lines 206 to 211 in ee9d5a3
I know it's not exactly a bug, but I did lose like 5 minutes puzzling over it because I couldn't see how the code produced the wanted behavior—in fact, it doesn't! The machine does not vend the juice once there's 0 remaining and then reset the cost to 50; it vends it once you insert a coin after there's 0 remaining, resets it to 50, and then credits the new coin. This does produce the behavior of vending after every 5 coins (except for the first time, which requires 6), but it's still a confusing example.
I set up a minimal runnable example for this code and recorded a demo run.
The text was updated successfully, but these errors were encountered: