semantic-typescript 0.0.6 β†’ 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.ko.md DELETED
@@ -1,335 +0,0 @@
1
- # πŸ“˜ semantic-typescript
2
-
3
- TypeScriptμ—μ„œ **의미둠적 데이터 처리(Semantic Data Processing)** λ₯Ό μœ„ν•œ κ°•λ ₯ν•˜κ³  νƒ€μž… μ•ˆμ „ν•œ μœ ν‹Έλ¦¬ν‹° λΌμ΄λΈŒλŸ¬λ¦¬μž…λ‹ˆλ‹€.
4
- μ»¬λ ‰μ…˜, 슀트림, μ‹œν€€μŠ€λ₯Ό ν•¨μˆ˜ν˜• μŠ€νƒ€μΌλ‘œ λ‹€λ£° 수 μžˆλŠ” ꡬ성 μš”μ†Œλ“€μ„ μ œκ³΅ν•˜λ©°, μ •λ ¬, 필터링, κ·Έλ£Ήν™”, 톡계 뢄석 등을 μ§€μ›ν•©λ‹ˆλ‹€.
5
-
6
- **μ •λ ¬λœ 데이터든 μ •λ ¬λ˜μ§€ μ•Šμ€ 데이터든**, **톡계 뢄석을 ν•˜λ“ **, ν˜Ήμ€ λ‹¨μˆœνžˆ **연산을 μœ μ°½ν•˜κ²Œ μ—°κ²°(chain)ν•˜κ³  μ‹Άλ“ **, 이 λΌμ΄λΈŒλŸ¬λ¦¬κ°€ λ„μ™€λ“œλ¦½λ‹ˆλ‹€.
7
-
8
- ---
9
-
10
- ## 🧩 μ£Όμš” κΈ°λŠ₯
11
-
12
- - βœ… μ „μ²΄μ μœΌλ‘œ **νƒ€μž… μ•ˆμ „ν•œ μ œλ„€λ¦­(Type-safe Generics)**
13
- - βœ… **ν•¨μˆ˜ν˜• ν”„λ‘œκ·Έλž˜λ° μŠ€νƒ€μΌ** (map, filter, reduce λ“±)
14
- - βœ… **의미둠적 데이터 슀트림(Semantic<E>)** - μ§€μ—° 평가(Lazy Evaluation) 지원
15
- - βœ… μŠ€νŠΈλ¦Όμ„ κ΅¬μ‘°ν™”λœ λ°μ΄ν„°λ‘œ λ³€ν™˜ν•˜λŠ” **컬렉터(Collectors)**
16
- - βœ… **μ •λ ¬λœ(Sorted) 및 λΉ„μ •λ ¬λœ(Unordered) 컬렉터** β€” `toUnordered()`λŠ” **κ°€μž₯ λΉ λ₯΄λ©° μ •λ ¬ν•˜μ§€ μ•ŠμŒ**
17
- - βœ… `sorted()`, `toOrdered()`, λΉ„κ΅μž(Comparator)λ₯Ό ν†΅ν•œ **μ •λ ¬ κΈ°λŠ₯**
18
- - βœ… **톡계 뢄석(Statistics)** (`NumericStatistics`, `BigIntStatistics` λ“±)
19
- - βœ… **Optional<T>** β€” null λ˜λŠ” undefined 값을 μ•ˆμ „ν•˜κ²Œ λ‹€λ£¨λŠ” λͺ¨λ‚˜λ“œ(Monad)
20
- - βœ… **반볡자(Iterator) & 생성기(Generator)** 기반 섀계 β€” λŒ€κ·œλͺ¨ λ˜λŠ” 비동기 데이터에도 적합
21
-
22
- ---
23
-
24
- ## πŸ“¦ μ„€μΉ˜
25
-
26
- ```bash
27
- npm install semantic-typescript
28
- ```
29
-
30
- ---
31
-
32
- ## 🧠 핡심 κ°œλ…
33
-
34
- ### 1. `Optional<T>` β€” null/undefined κ°’ μ•ˆμ „ν•˜κ²Œ 처리
35
-
36
- 값이 null λ˜λŠ” undefined 일 수 μžˆλŠ” 경우λ₯Ό μ•ˆμ „ν•˜κ²Œ μ²˜λ¦¬ν•  수 μžˆλŠ” λͺ¨λ‚˜λ”•(Monadic) μ»¨ν…Œμ΄λ„ˆμž…λ‹ˆλ‹€.
37
-
38
- #### λ©”μ„œλ“œ:
39
-
40
- | λ©”μ„œλ“œ | μ„€λͺ… | 예제 |
41
- |--------|------|------|
42
- | `of(value)` | κ°’ 감싸기 (null κ°€λŠ₯) | `Optional.of(null)` |
43
- | `ofNullable(v)` | null ν—ˆμš©ν•˜μ—¬ 감싸기 | `Optional.ofNullable(someVar)` |
44
- | `ofNonNull(v)` | null이면 μ˜ˆμ™Έ λ°œμƒ | `Optional.ofNonNull(5)` |
45
- | `get()` | κ°’ κ°€μ Έμ˜€κΈ° (μ—†μœΌλ©΄ μ˜ˆμ™Έ) | `opt.get()` |
46
- | `getOrDefault(d)` | κ°’ κ°€μ Έμ˜€κΈ° λ˜λŠ” κΈ°λ³Έκ°’ | `opt.getOrDefault(0)` |
47
- | `ifPresent(fn)` | 값이 있으면 λΆ€μž‘μš© μ‹€ν–‰ | `opt.ifPresent(x => console.log(x))` |
48
- | `map(fn)` | 값이 있으면 λ³€ν™˜ | `opt.map(x => x + 1)` |
49
- | `filter(fn)` | 쑰건을 λ§Œμ‘±ν•˜λŠ” κ°’λ§Œ μœ μ§€ | `opt.filter(x => x > 0)` |
50
- | `isEmpty()` | λΉ„μ–΄μžˆλŠ”μ§€ 확인 | `opt.isEmpty()` |
51
- | `isPresent()` | 값이 μžˆλŠ”μ§€ 확인 | `opt.isPresent()` |
52
-
53
- #### 예제:
54
-
55
- ```typescript
56
- import { Optional } from 'semantic-typescript';
57
-
58
- const value: number | null = Math.random() > 0.5 ? 10 : null;
59
-
60
- const opt = Optional.ofNullable(value);
61
-
62
- const result = opt
63
- .filter(v => v > 5)
64
- .map(v => v * 2)
65
- .getOrDefault(0);
66
-
67
- console.log(result); // 20 λ˜λŠ” 0
68
- ```
69
-
70
- ---
71
-
72
- ### 2. `Semantic<E>` β€” μ§€μ—° 평가 데이터 슀트림
73
-
74
- μš”μ†Œλ“€μ˜ **μ§€μ—° 평가(Lazy), ꡬ성 κ°€λŠ₯ν•œ μ‹œν€€μŠ€**μž…λ‹ˆλ‹€. Java의 Streamsλ‚˜ Kotlin의 Sequences와 μœ μ‚¬ν•©λ‹ˆλ‹€.
75
-
76
- `from()`, `range()`, `iterate()`, `fill()` 같은 헬퍼 ν•¨μˆ˜λ‘œ `Semantic` μŠ€νŠΈλ¦Όμ„ 생성할 수 μžˆμŠ΅λ‹ˆλ‹€.
77
-
78
- #### 생성 방법:
79
-
80
- | ν•¨μˆ˜ | μ„€λͺ… | 예제 |
81
- |------|------|------|
82
- | `from(iterable)` | λ°°μ—΄, Set, 반볡 κ°€λŠ₯ν•œ κ°μ²΄λ‘œλΆ€ν„° 생성 | `from([1, 2, 3])` |
83
- | `range(start, end, step?)` | 숫자 λ²”μœ„ 생성 | `range(0, 5)` β†’ 0,1,2,3,4 |
84
- | `fill(element, count)` | μš”μ†Œλ₯Ό N번 반볡 | `fill('a', 3n)` |
85
- | `iterate(gen)` | μ‚¬μš©μž μ •μ˜ 생성기 ν•¨μˆ˜ μ‚¬μš© | `iterate(genFn)` |
86
-
87
- #### μ£Όμš” μ—°μ‚°μž:
88
-
89
- | λ©”μ„œλ“œ | μ„€λͺ… | 예제 |
90
- |--------|------|------|
91
- | `map(fn)` | 각 μš”μ†Œ λ³€ν™˜ | `.map(x => x * 2)` |
92
- | `filter(fn)` | 쑰건을 λ§Œμ‘±ν•˜λŠ” μš”μ†Œλ§Œ μœ μ§€ | `.filter(x => x > 10)` |
93
- | `limit(n)` | 처음 N개 μš”μ†Œλ‘œ μ œν•œ | `.limit(5)` |
94
- | `skip(n)` | 처음 N개 μš”μ†Œ κ±΄λ„ˆλ›°κΈ° | `.skip(2)` |
95
- | `distinct()` | 쀑볡 제거 (기본적으둜 Set μ‚¬μš©) | `.distinct()` |
96
- | `sorted()` | μš”μ†Œ μ •λ ¬ (μžμ—° μˆœμ„œ) | `.sorted()` |
97
- | `sorted(comparator)` | μ»€μŠ€ν…€ μ •λ ¬ | `.sorted((a, b) => a - b)` |
98
- | `toOrdered()` | μ •λ ¬ ν›„ `OrderedCollectable` λ°˜ν™˜ | `.toOrdered()` |
99
- | `toUnordered()` | **μ •λ ¬ μ—†μŒ – κ°€μž₯ 빠름** | `.toUnordered()` βœ… |
100
- | `collect(collector)` | μ»¬λ ‰ν„°λ‘œ 집계 | `.collect(Collector.full(...))` |
101
- | `toArray()` | λ°°μ—΄λ‘œ λ³€ν™˜ | `.toArray()` |
102
- | `toSet()` | Set으둜 λ³€ν™˜ | `.toSet()` |
103
- | `toMap(keyFn, valFn)` | Map으둜 λ³€ν™˜ | `.toMap(x => x.id, x => x)` |
104
-
105
- ---
106
-
107
- ### 3. `toUnordered()` β€” πŸš€ κ°€μž₯ 빠름, μ •λ ¬ μ—†μŒ
108
-
109
- **정렬이 ν•„μš” μ—†κ³  졜고의 μ„±λŠ₯을 μ›ν•œλ‹€λ©΄** μ•„λž˜μ™€ 같이 μ‚¬μš©ν•˜μ„Έμš”:
110
-
111
- ```typescript
112
- const fastest = semanticStream.toUnordered();
113
- ```
114
-
115
- πŸ”₯ **μ–΄λ– ν•œ μ •λ ¬ μ•Œκ³ λ¦¬μ¦˜λ„ μ μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.**
116
- μˆœμ„œκ°€ μ€‘μš”ν•˜μ§€ μ•Šκ³  속도가 μ΅œμš°μ„ μΌ λ•Œ 이 방법을 μ‚¬μš©ν•˜μ„Έμš”.
117
-
118
- ---
119
-
120
- ### 4. `toOrdered()` 및 `sorted()` β€” μ •λ ¬λœ 좜λ ₯
121
-
122
- **μ •λ ¬λœ κ²°κ³Όκ°€ ν•„μš”ν•œ 경우** λ‹€μŒμ„ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€:
123
-
124
- ```typescript
125
- const ordered = semanticStream.sorted(); // μžμ—° μ •λ ¬
126
- const customSorted = semanticStream.sorted((a, b) => a - b); // μ»€μŠ€ν…€ λΉ„κ΅μž
127
- const orderedCollectable = semanticStream.toOrdered(); // 정렬됨
128
- ```
129
-
130
- ⚠️ 이 λ©”μ„œλ“œλ“€μ€ **μš”μ†Œλ₯Ό μ •λ ¬**ν•˜λ©°, μžμ—° μ •λ ¬ λ˜λŠ” 제곡된 λΉ„κ΅μžλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€.
131
-
132
- ---
133
-
134
- ### 5. `Collector<E, A, R>` β€” 데이터 집계
135
-
136
- 컬렉터λ₯Ό μ‚¬μš©ν•˜λ©΄ μŠ€νŠΈλ¦Όμ„ **단일 κ°’ λ˜λŠ” λ³΅μž‘ν•œ ꡬ쑰둜 μΆ•μ•½**ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
137
-
138
- λ‚΄μž₯된 정적 νŒ©ν† λ¦¬:
139
-
140
- ```typescript
141
- Collector.full(identity, accumulator, finisher)
142
- Collector.shortable(identity, interruptor, accumulator, finisher)
143
- ```
144
-
145
- ν•˜μ§€λ§Œ 보톡은 `Collectable` 클래슀의 κ³ μˆ˜μ€€ λ©”μ„œλ“œλ₯Ό 톡해 μ‚¬μš©ν•˜κ²Œ λ©λ‹ˆλ‹€.
146
-
147
- ---
148
-
149
- ### 6. `Collectable<E>` (좔상 클래슀)
150
-
151
- λ‹€μŒ ν΄λž˜μŠ€λ“€μ˜ 기반 ν΄λž˜μŠ€μž…λ‹ˆλ‹€:
152
-
153
- - `OrderedCollectable<E>` β€” μ •λ ¬λœ 좜λ ₯
154
- - `UnorderedCollectable<E>` β€” μ •λ ¬ μ—†μŒ, κ°€μž₯ 빠름
155
- - `WindowCollectable<E>` β€” μŠ¬λΌμ΄λ”© μœˆλ„μš°
156
- - `Statistics<E, D>` β€” 톡계 집계
157
-
158
- #### 곡톡 λ©”μ„œλ“œ (상속을 톡해):
159
-
160
- | λ©”μ„œλ“œ | μ„€λͺ… | 예제 |
161
- |--------|------|------|
162
- | `count()` | μš”μ†Œ 개수 | `.count()` |
163
- | `toArray()` | λ°°μ—΄λ‘œ λ³€ν™˜ | `.toArray()` |
164
- | `toSet()` | Set으둜 λ³€ν™˜ | `.toSet()` |
165
- | `toMap(k, v)` | Map으둜 λ³€ν™˜ | `.toMap(x => x.id, x => x)` |
166
- | `group(k)` | ν‚€λ‘œ κ·Έλ£Ήν™” | `.group(x => x.category)` |
167
- | `findAny()` | μž„μ˜μ˜ μš”μ†Œ (Optional) | `.findAny()` |
168
- | `findFirst()` | 첫 번째 μš”μ†Œ (Optional) | `.findFirst()` |
169
- | `reduce(...)` | μ»€μŠ€ν…€ μΆ•μ•½ | `.reduce((a,b) => a + b, 0)` |
170
-
171
- ---
172
-
173
- ### 7. `OrderedCollectable<E>` β€” μ •λ ¬λœ 데이터
174
-
175
- μš”μ†Œλ“€μ„ **μžλ™μœΌλ‘œ μ •λ ¬**ν•˜κ³  μ‹Άλ‹€λ©΄ 이 클래슀λ₯Ό μ‚¬μš©ν•˜μ„Έμš”.
176
-
177
- **μ»€μŠ€ν…€ λΉ„κ΅μž**λ₯Ό λ°›κ±°λ‚˜ μžμ—° 정렬을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
178
-
179
- ```typescript
180
- const sorted = new OrderedCollectable(stream);
181
- const customSorted = new OrderedCollectable(stream, (a, b) => b - a);
182
- ```
183
-
184
- πŸ”’ **μ •λ ¬λœ 좜λ ₯이 보μž₯λ©λ‹ˆλ‹€.**
185
-
186
- ---
187
-
188
- ### 8. `UnorderedCollectable<E>` β€” μ •λ ¬ μ—†μŒ (πŸš€ κ°€μž₯ 빠름)
189
-
190
- **μˆœμ„œκ°€ μ€‘μš”ν•˜μ§€ μ•Šκ³  졜고의 μ„±λŠ₯이 ν•„μš”ν•œ 경우** λ‹€μŒμ„ μ‚¬μš©ν•˜μ„Έμš”:
191
-
192
- ```typescript
193
- const unordered = new UnorderedCollectable(stream);
194
- // λ˜λŠ”
195
- const fastest = semanticStream.toUnordered();
196
- ```
197
-
198
- βœ… **μ •λ ¬ μ•Œκ³ λ¦¬μ¦˜μ΄ μ‹€ν–‰λ˜μ§€ μ•ŠμŒ**
199
- βœ… **μˆœμ„œκ°€ μ€‘μš”ν•˜μ§€ μ•Šμ„ λ•Œ 졜고의 μ„±λŠ₯**
200
-
201
- ---
202
-
203
- ### 9. `Statistics<E, D>` β€” 톡계 뢄석
204
-
205
- 숫자 데이터λ₯Ό λΆ„μ„ν•˜κΈ° μœ„ν•œ 좔상 기반 ν΄λž˜μŠ€μž…λ‹ˆλ‹€.
206
-
207
- #### μ„œλΈŒ 클래슀:
208
-
209
- - `NumericStatistics<E>` β€” `number` κ°’μš©
210
- - `BigIntStatistics<E>` β€” `bigint` κ°’μš©
211
-
212
- ##### μ£Όμš” 톡계 λ©”μ„œλ“œ:
213
-
214
- | λ©”μ„œλ“œ | μ„€λͺ… | 예제 |
215
- |--------|------|------|
216
- | `mean()` | 평균 | `.mean()` |
217
- | `median()` | 쀑앙값 | `.median()` |
218
- | `mode()` | μ΅œλΉˆκ°’ | `.mode()` |
219
- | `minimum()` | μ΅œμ†Ÿκ°’ | `.minimum()` |
220
- | `maximum()` | μ΅œλŒ“κ°’ | `.maximum()` |
221
- | `range()` | μ΅œλŒ“κ°’ - μ΅œμ†Ÿκ°’ | `.range()` |
222
- | `variance()` | λΆ„μ‚° | `.variance()` |
223
- | `standardDeviation()` | ν‘œμ€€ 편차 | `.standardDeviation()` |
224
- | `summate()` | 합계 | `.summate()` |
225
- | `quantile(q)` | qλΆ„μœ„μˆ˜ (0~1) | `.quantile(0.5)` β†’ 쀑앙값 |
226
- | `frequency()` | λΉˆλ„ λ§΅ | `.frequency()` |
227
-
228
- ---
229
-
230
- ## πŸ§ͺ 전체 예제
231
-
232
- ```typescript
233
- import { from, toUnordered, toOrdered, sorted, NumericStatistics } from 'semantic-typescript';
234
-
235
- // μƒ˜ν”Œ 데이터
236
- const numbers = from([10, 2, 8, 4, 5, 6]);
237
-
238
- // πŸš€ κ°€μž₯ 빠름: μ •λ ¬ μ—†μŒ
239
- const fastest = numbers.toUnordered();
240
- console.log(fastest.toArray()); // 예: [10, 2, 8, 4, 5, 6] (μ›λž˜ μˆœμ„œ)
241
-
242
- // πŸ”’ μžμ—° μ •λ ¬
243
- const ordered = numbers.sorted();
244
- console.log(ordered.toArray()); // [2, 4, 5, 6, 8, 10]
245
-
246
- // πŸ“Š 톡계 뢄석
247
- const stats = new NumericStatistics(numbers);
248
- console.log('평균:', stats.mean());
249
- console.log('쀑앙값:', stats.median());
250
- console.log('μ΅œλΉˆκ°’:', stats.mode());
251
- console.log('λ²”μœ„:', stats.range());
252
- console.log('ν‘œμ€€ 편차:', stats.standardDeviation());
253
- ```
254
-
255
- ---
256
-
257
- ## πŸ› οΈ μœ ν‹Έλ¦¬ν‹° ν•¨μˆ˜
258
-
259
- λ‹€μ–‘ν•œ **νƒ€μž… κ°€λ“œ(Type Guards)** 와 **비ꡐ 도ꡬ**도 μ œκ³΅λ©λ‹ˆλ‹€:
260
-
261
- | ν•¨μˆ˜ | μš©λ„ |
262
- |------|------|
263
- | `isString(x)` | `string` νƒ€μž… κ°€λ“œ |
264
- | `isNumber(x)` | `number` νƒ€μž… κ°€λ“œ |
265
- | `isBoolean(x)` | `boolean` νƒ€μž… κ°€λ“œ |
266
- | `isIterable(x)` | 객체가 반볡 κ°€λŠ₯ν•œμ§€ 확인 |
267
- | `useCompare(a, b)` | λ²”μš© 비ꡐ ν•¨μˆ˜ |
268
- | `useRandom(x)` | μ˜μ‚¬ λ‚œμˆ˜ 생성기 (μž¬λ―Έμ‚Όμ•„) |
269
-
270
- ---
271
-
272
- ## 🧩 κ³ κΈ‰: μ»€μŠ€ν…€ 생성기 & μœˆλ„μš°
273
-
274
- λ¬΄ν•œ λ˜λŠ” μ œμ–΄λœ 데이터 μŠ€νŠΈλ¦Όμ„ μœ„ν•œ **μ»€μŠ€ν…€ 생성기**λ₯Ό λ§Œλ“€ 수 μžˆμŠ΅λ‹ˆλ‹€:
275
-
276
- ```typescript
277
- const gen = (accept: BiConsumer<number, bigint>, interrupt: Predicate<number>) => {
278
- for (let i = 0; i < 10; i++) {
279
- accept(i, BigInt(i));
280
- if (i === 5) interrupt(i);
281
- }
282
- };
283
-
284
- const s = new Semantic(gen);
285
- ```
286
-
287
- λ˜λŠ” **μŠ¬λΌμ΄λ”© μœˆλ„μš°**λ₯Ό μ‚¬μš©ν•  μˆ˜λ„ μžˆμŠ΅λ‹ˆλ‹€:
288
-
289
- ```typescript
290
- const windowed = ordered.slide(3n, 2n); // 크기 3, μŠ€ν… 2
291
- ```
292
-
293
- ---
294
-
295
- ## πŸ“„ λΌμ΄μ„ μŠ€
296
-
297
- 이 ν”„λ‘œμ νŠΈλŠ” **MIT λΌμ΄μ„ μŠ€** 둜 제곡되며, μƒμ—…μ Β·κ°œμΈμ  μš©λ„λ‘œ 자유둭게 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
298
-
299
- ---
300
-
301
- ## πŸ™Œ κΈ°μ—¬
302
-
303
- Pull Request, 이슈(Issue), 아이디어 μ œμ•ˆ λ“± λͺ¨λ‘ ν™˜μ˜ν•©λ‹ˆλ‹€!
304
-
305
- ---
306
-
307
- ## πŸš€ λΉ λ₯Έ μ‹œμž‘ μš”μ•½
308
-
309
- | μž‘μ—… | λ©”μ„œλ“œ |
310
- |------|--------|
311
- | null/undefined μ•ˆμ „ν•˜κ²Œ 처리 | `Optional<T>` |
312
- | 슀트림 생성 | `from([...])`, `range()`, `fill()` |
313
- | 데이터 λ³€ν™˜ | `map()`, `filter()` |
314
- | 데이터 μ •λ ¬ | `sorted()`, `toOrdered()` |
315
- | μ •λ ¬ μ—†μŒ (κ°€μž₯ 빠름) | `toUnordered()` βœ… |
316
- | κ·Έλ£Ήν™” / 집계 | `toMap()`, `group()`, `Collector` |
317
- | 톡계 | `NumericStatistics`, `mean()`, `median()` λ“± |
318
-
319
- ---
320
-
321
- ## πŸ”— 링크
322
-
323
- - πŸ“¦ npm: https://www.npmjs.com/package/semantic-typescript
324
- - πŸ™ GitHub: https://github.com/eloyhere/semantic-typescript
325
- - πŸ“˜ λ¬Έμ„œ: μ†ŒμŠ€ μ½”λ“œ / νƒ€μž… μ •μ˜ μ°Έμ‘°
326
-
327
- ---
328
-
329
- **TypeScriptμ—μ„œ ν•¨μˆ˜ν˜•, νƒ€μž… μ•ˆμ „ν•˜κ³  ꡬ성 κ°€λŠ₯ν•œ 데이터 처리λ₯Ό μ¦κ²¨λ³΄μ„Έμš”.** πŸš€
330
-
331
- ---
332
-
333
- βœ… **μ°Έκ³ :**
334
- - `toUnordered()` β†’ **μ •λ ¬ μ—†μŒ, κ°€μž₯ 빠름**
335
- - κ·Έ μ™Έ (`sorted()`, `toOrdered()` λ“±) β†’ **데이터λ₯Ό 정렬함**