Skip to content

Instantly share code, notes, and snippets.

@WimJongeneel
Created October 25, 2020 13:27
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 WimJongeneel/d41727471d3071f25626118c7a0f3a38 to your computer and use it in GitHub Desktop.
Save WimJongeneel/d41727471d3071f25626118c7a0f3a38 to your computer and use it in GitHub Desktop.
/**
* Output a given a' after a delay
*
* @param delay the delay in ms
* @param a the value to output
*/
export const wait = <a = void>(delay: number, a: a = null): Cont<a> =>
create_cont(cb => setTimeout(() => cb(a), delay))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment