cangjie-function

Documents Cangjie language functions including lambdas, closures, and overloading.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-function-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-function
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/function
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-function-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on defining, calling, and utilizing various advanced features of Cangjie language functions, enabling developers to write more robust and expressive code.

Core Features & Use Cases

  • Function Definition & Parameters: Understand basic syntax, named parameters, default values, and parameter ordering rules.
  • Function Types & Lambdas: Learn how to treat functions as first-class citizens, use lambda expressions, and understand closure behavior.
  • Advanced Concepts: Explore function overloading, operator overloading, trailing lambdas, pipe, and composition operators.
  • Use Case: When encountering complex scenarios involving functional programming paradigms or needing to define reusable, flexible code blocks in Cangjie, this Skill offers the necessary details.

Quick Start

Explain how to define a Cangjie function with a default named parameter.

Frequently Asked Questions about cangjie-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define a Cangjie function with named parameters and default values?

To define a Cangjie function with default named parameters, you specify the parameter names and assign default values directly in the function signature, adhering to parameter ordering rules for flexible calling.

Can I use lambda expressions and closures for functional programming in Cangjie?

Yes, Cangjie supports functional programming by treating functions as first-class citizens, allowing you to use lambda expressions and implement closures to capture and manipulate surrounding variables.

How does function overloading work in the Cangjie language?

Cangjie function overloading allows multiple functions with the same name but different parameter lists, enabling you to define reusable and flexible code blocks that handle various data types or argument counts.

What is the syntax for operator overloading in Cangjie?

Operator overloading in Cangjie lets you define custom behaviors for standard operators within your functions, providing an expressive way to interact with user-defined types through specialized syntax.

Does Cangjie support trailing lambdas and composition operators?

Yes, Cangjie supports advanced functional programming constructs including trailing lambdas, pipe operators, and composition operators to help you write robust and expressive code.

When should I use nested functions in Cangjie?

You should use nested functions in Cangjie when you need to encapsulate helper logic strictly within a parent function, ensuring the nested block remains inaccessible and isolated from the outer scope.