diff --git a/src/prelude/array.ts b/src/prelude/array.ts index 778e5e37c..d02de9b2e 100644 --- a/src/prelude/array.ts +++ b/src/prelude/array.ts @@ -11,8 +11,8 @@ export function countIf(f: Predicate, xs: T[]): number { /** * Count the number of elements that is equal to the element */ -export function count(x: T, xs: T[]): number { - return countIf(y => x === y, xs); +export function count(a: T, xs: T[]): number { + return countIf(x => x === a, xs); } /** @@ -33,8 +33,8 @@ export function intersperse(sep: T, xs: T[]): T[] { /** * Returns the array of elements that is not equal to the element */ -export function erase(x: T, xs: T[]): T[] { - return xs.filter(y => x !== y); +export function erase(a: T, xs: T[]): T[] { + return xs.filter(x => x !== a); } /** diff --git a/src/prelude/relation.ts b/src/prelude/relation.ts index b3aedc5ff..1f4703f52 100644 --- a/src/prelude/relation.ts +++ b/src/prelude/relation.ts @@ -1,5 +1,5 @@ -export type Predicate = (x: T) => boolean; +export type Predicate = (a: T) => boolean; -export type Relation = (x: T, y: U) => boolean; +export type Relation = (a: T, b: U) => boolean; export type EndoRelation = Relation;