Write a function that accepts a function as it's only argument and returns a new function that can only ever be executed once.
Once completed, add a second arguments that allows the function to be executed x
number of times before it stops working.