The most common is using "function name(args)"
Also you can use "local" as prefix to limit the scope, otherwise your examples create global functions usable by all addons, and it might even write over already existing functions like that. Just be careful.