Register an optional function. This can be later retrieved, type-safely, by name. Like all global functions, the name must be unique. Note that, confusingly but correctly, the function itself can be static!