Make a function or method callable only once