Wouldn't this cause the function to be called before the delay if the returned function is called twice before the delay? Probably should also add a test and docs specifying the behavior when called multiple times before the delay. This is probably enough of an edge case that just saving the last call would be fine (using a simple flag instead of a counter to show if the timeout has elapsed), @millermedeiros what do you think?