File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+
2+
3+ Procedural :: module {
4+ // Function: forEach
5+ // Executes a function on each element of the array
6+ //
7+ // Parameters:
8+ // array - The array to iterate over
9+ // fx - A function to call for each element in the array
10+ //
11+ // Returns:
12+ // (Unit) - Represents the absence of a meaningful return value
13+ //
14+ // Notes:
15+ // This function is intended for cases where `fx` performs side effects,
16+ // like printing, logging, or mutating external state.
17+ forEach :: (arr, func) = pic_nat_foreach(arr, func)
18+
19+
20+
21+ // Function: forever
22+ // Executes a function forever
23+ //
24+ // Parameters:
25+ // fx - A function to call
26+ //
27+ // Returns:
28+ // (Unit) - Represents the absence of a meaningful return value
29+ forever :: (func) = pic_nat_forever(func)
30+ }
31+
You can’t perform that action at this time.
0 commit comments