Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
be192f39
Commit
be192f39
authored
Jul 26, 1999
by
Marcus Comstedt
Browse files
Options
Downloads
Patches
Plain Diff
Renamed foldl/foldr to reduce/rreduce.
Rev: lib/modules/Array.pmod:1.38
parent
48be818d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Array.pmod
+2
-4
2 additions, 4 deletions
lib/modules/Array.pmod
with
2 additions
and
4 deletions
lib/modules/Array.pmod
+
2
−
4
View file @
be192f39
...
@@ -90,7 +90,7 @@ mixed filter(mixed arr, mixed fun, mixed ... args)
...
@@ -90,7 +90,7 @@ mixed filter(mixed arr, mixed fun, mixed ... args)
}
}
}
}
mixed
foldl
(function fun, array arr, mixed|void zero)
mixed
reduce
(function fun, array arr, mixed|void zero)
{
{
if(sizeof(arr))
if(sizeof(arr))
zero = arr[0];
zero = arr[0];
...
@@ -99,7 +99,7 @@ mixed foldl(function fun, array arr, mixed|void zero)
...
@@ -99,7 +99,7 @@ mixed foldl(function fun, array arr, mixed|void zero)
return zero;
return zero;
}
}
mixed
foldr
(function fun, array arr, mixed|void zero)
mixed
rreduce
(function fun, array arr, mixed|void zero)
{
{
if(sizeof(arr))
if(sizeof(arr))
zero = arr[-1];
zero = arr[-1];
...
@@ -108,8 +108,6 @@ mixed foldr(function fun, array arr, mixed|void zero)
...
@@ -108,8 +108,6 @@ mixed foldr(function fun, array arr, mixed|void zero)
return zero;
return zero;
}
}
function reduce = foldl;
array shuffle(array arr)
array shuffle(array arr)
{
{
int i = sizeof(arr);
int i = sizeof(arr);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment