summaryrefslogtreecommitdiff
path: root/src/prelude/array.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/prelude/array.ts')
-rw-r--r--src/prelude/array.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/prelude/array.ts b/src/prelude/array.ts
index 778e5e37c3..d02de9b2e5 100644
--- a/src/prelude/array.ts
+++ b/src/prelude/array.ts
@@ -11,8 +11,8 @@ export function countIf<T>(f: Predicate<T>, xs: T[]): number {
/**
* Count the number of elements that is equal to the element
*/
-export function count<T>(x: T, xs: T[]): number {
- return countIf(y => x === y, xs);
+export function count<T>(a: T, xs: T[]): number {
+ return countIf(x => x === a, xs);
}
/**
@@ -33,8 +33,8 @@ export function intersperse<T>(sep: T, xs: T[]): T[] {
/**
* Returns the array of elements that is not equal to the element
*/
-export function erase<T>(x: T, xs: T[]): T[] {
- return xs.filter(y => x !== y);
+export function erase<T>(a: T, xs: T[]): T[] {
+ return xs.filter(x => x !== a);
}
/**