cangjie-std-array

Document the Cangjie standard library Array<T> type with construction and manipulation operations.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-std-array
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-std-array
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/array
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-std-array

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to the Array<T> type in Cangjie, covering its construction, manipulation, and advanced operations, ensuring developers can efficiently use arrays in their Cangjie programs.

Core Features & Use Cases

  • Array Construction: Learn various methods to create arrays, from literals to size-initialized arrays.
  • Element Access & Modification: Understand how to get, set, and swap elements safely and efficiently.
  • Slicing, Concatenation, and Repetition: Master operations for manipulating array segments and combining arrays.
  • Searching, Sorting, and Mapping: Discover how to find elements, sort arrays (using std.sort), and transform elements.
  • Use Case: Quickly reference the exact syntax for creating a new array of a specific size, filling it with default values, and then mapping a transformation function to each element.

Quick Start

Show me how to create an array of integers from 0 to 9 using the Array<Int64>(size, {i => i}) constructor.

Frequently Asked Questions about cangjie-std-array

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

FAQPage Schema
How do I create an array of a specific size with default values in Cangjie?

To create an array in Cangjie, use the Array<T>(size, {i => value}) constructor to initialize elements with a transformation function, yielding a size-initialized array populated with desired default values.

Can I slice and concatenate arrays in Cangjie?

Cangjie arrays support slicing to extract array segments and concatenation to combine multiple arrays, enabling developers to manipulate array data structures and merge array collections efficiently.

What is the best way to search and sort array elements in Cangjie?

Searching and sorting Cangjie arrays involves using built-in array methods for finding elements and applying std.sort to reorder your array, resulting in an organized and searchable array data structure.

How do I transform array elements using mapping in Cangjie?

Mapping in Cangjie applies a transformation function to each array element, producing a new array where every item is modified according to the defined logic for dynamic data structure manipulation.

Does the Cangjie standard library support array flattening and reversing?

The Cangjie standard library Array<T> type supports flattening to convert nested arrays into a single array and reversing to invert element order for comprehensive array manipulation.