Congratulations!
You have completed the Functions lesson. You now have mastered the core concepts of functions in Cangjie:
- Use the
funckeyword to define functions - Basic syntax for parameter lists and return types
- Implicit returns make code more concise
- Use tuples to implement multiple return values
- Named parameters improve code readability
- Default parameter values simplify function calls
Functions are the building blocks of programs, and understanding function definition and usage is the foundation for further learning. In the following chapters, you'll see more application scenarios for functions, including advanced features like higher-order functions and closures.
You can return to the module list to see what to learn next, or continue to the next lesson. Click Next to continue.