I debounced a boolean. I feel like it could be better.
This should take the initial value as output, and requires consistency for one second to change value. I'm curious what's out there or what has been tried?
What i like about this:
Simple to understand
What I don't like about it:
Small periodic blips could prevent state changes from ever occurring.
Uses time as a metric (I actually prefer non-time metrics, like voting algorithm as they need less consideration)
Uses two feedback nodes. (seems excessive).
Takes one call after debounce time to propagate output.
Functionally impure. (e.g. has statefulness although seems pretty necessary here)