Skip to content

Commit 4a36b43

Browse files
committed
examples: Change the name of the module
1 parent 58916d3 commit 4a36b43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
// Module: Array
2+
// Module: List
33
// Common array operations including transformation, combination, and querying
4-
Array :: module {
4+
List :: module {
55

66
// Function: concat
77
// Combines two arrays into a single array
@@ -131,7 +131,7 @@ Array :: module {
131131
// Returns:
132132
// A new array with elements in reverse order
133133
reverse :: (xs=[]) =
134-
Array::reduce(xs, |acc, x| -> x : acc, [])
134+
List::reduce(xs, |acc, x| -> x : acc, [])
135135

136136
// Function: flatMap
137137
// Maps a over an array and flattens the result
@@ -143,7 +143,7 @@ Array :: module {
143143
// Returns:
144144
// A flat array of concatenated results
145145
flatMap :: (xs=[], f) =
146-
Array::reduce(xs, |acc, x| -> Array::concat(acc, f(x)), [])
146+
List::reduce(xs, |acc, x| -> List::concat(acc, f(x)), [])
147147

148148
// Function: take
149149
// Takes the first N elements from the array

std/proc/loop/loops

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// Module: Procedural
44
// Provides utility functions for features supported by procedural languages
5-
Procedural :: module {
5+
Loops :: module {
66
// Function: forEach
77
// Executes a function on each element of the array
88
//

0 commit comments

Comments
 (0)