From c03e2dfbc00bf49de6e9651086ead1966dd127a2 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Wed, 19 Dec 2018 22:38:27 +0900 Subject: [PATCH] Change naming (#3678) * Change naming * x to a --- src/prelude/array.ts | 8 ++++---- src/prelude/relation.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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;