Interesting, thanks! I'm not quite following one part of this. I renamed some things to help myself out:
steadyFor : Time -> Signal a -> Signal a
steadyFor time signal = sampleOn (dropRepeats (since time signal)) signal
That inner bit has me confused:
dropRepeats (since time signal)
"since" returns Signal Boolean, which I take to mean that dropRepeats will drop a bunch of False events and then keep the lone True event that comes after the specified time has elapsed after the keyup signal.
But what if the user pressed one key, then waited longer than 500ms, then pressed another key? If I understand "since" correctly, its resulting Signal Bool will fire exactly two events in that case, and they will both be True, so dropRepeats will drop them as a repeat, and the search will fail to be performed even though it should.
The docs for "since" say its Signal's value is False by default, but I assume it's not sending out False events every millisecond, right? I assume it would only actually fire (thereby passing through dropRepeats) when it has a True to report (although I admit that in that case I don't know under what circumstances the False would come up).
What am I missing there?