Skip to content

Instantly share code, notes, and snippets.

@jamesmacaulay
Created September 17, 2014 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesmacaulay/cbbd5b573c5dbf6ddd12 to your computer and use it in GitHub Desktop.
Save jamesmacaulay/cbbd5b573c5dbf6ddd12 to your computer and use it in GitHub Desktop.
debounce : Time -> Signal a -> Signal a
debounce t sig = sig |> sampleOn (Time.since t sig |> keepIf not False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment