Course of Raku / Essentials / Creating and calling functions
Function names
The name of a function is an identifier that follows the same rules as variable names. It must start with a letter or underscore and can be followed by any letters, digits, underscore character, single quote (apostrophe), and hyphens.
Apostrophes and hyphens must be followed by alphabetic characters. While apostrophes are not widely used in identifiers, hyphens are used quite extensively as they add an additional level of expressivity.
Below is a short list of examples of valid function names.
greet
greet-them
hello-world
NumberOfItems
is-valid
to_be-or-not_to_be
Course navigation
← Creating and calling functions | Creating and calling functions / Function parameters →
💪 Or jump directly to the exercises to this section.
Translations of this page: English • Deutsch • Español • Italiano • Latviešu • Nederlands • Български • Русский • Українська