cangjie-function

Explain Cangjie function definitions, calls, and parameter handling.

4|1|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/JunjieChen0/NJUST --skill cangjie-function-junjiechen0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-function
Source: https://github.com/JunjieChen0/NJUST/tree/main/.njust-ai/skills/cangjie-function
Command: npx skills add https://github.com/JunjieChen0/NJUST --skill cangjie-function-junjiechen0

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and implement Cangjie language functions, including definitions, calls, and parameter handling.

Core Features & Use Cases

  • Comprehensive guidance on function syntax: definitions, returns, and parameter rules.
  • Support for lambdas, closures, nested functions, and overloads across single-file and multi-file contexts.
  • Real-world usage scenarios across API design, scripting, and language tooling.

Quick Start

Define a simple Cangjie function with two parameters to see how parameter rules and return types work.

Frequently Asked Questions about cangjie-function

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

FAQPage Schema
How do I define functions in Cangjie with default values and variadic parameters?

Defining Cangjie functions with default values and variadic parameters requires explicit parameter naming rules specified in the language specification. You apply these parameter handling features during function definitions to build robust APIs and scripts across single-file and multi-file contexts.

What is the syntax for writing lambda expressions and closures in Cangjie?

Writing lambda expressions and closures in Cangjie involves using function types to implement nested functions that capture their surrounding context. This mechanism supports real-world scripting and API design scenarios by enabling concise inline function definitions and calls.

How do function overloads work across single-file and multi-file contexts in Cangjie?

Function overloads in Cangjie work by defining multiple functions with the same name but different parameter rules across single-file and multi-file contexts. This allows developers to build robust code that handles varying explicit parameter types and return types effectively.

Can I use nested functions and pipeline features for API design in Cangjie?

Using nested functions and pipeline features for API design in Cangjie is fully supported to help developers implement functional flows. These features satisfy language specification requirements for passing function types as parameters and chaining operations cleanly across contexts.