diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-12-19 22:38:27 +0900 |
|---|---|---|
| committer | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2018-12-19 22:38:27 +0900 |
| commit | c03e2dfbc00bf49de6e9651086ead1966dd127a2 (patch) | |
| tree | ba1b22e4ad956a46456ff33c97b12f79fdf15702 /src | |
| parent | Hide hidden contents in welcome timeline (#3682) (diff) | |
| download | sharkey-c03e2dfbc00bf49de6e9651086ead1966dd127a2.tar.gz sharkey-c03e2dfbc00bf49de6e9651086ead1966dd127a2.tar.bz2 sharkey-c03e2dfbc00bf49de6e9651086ead1966dd127a2.zip | |
Change naming (#3678)
* Change naming
* x to a
Diffstat (limited to 'src')
| -rw-r--r-- | src/prelude/array.ts | 8 | ||||
| -rw-r--r-- | 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 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); } /** diff --git a/src/prelude/relation.ts b/src/prelude/relation.ts index b3aedc5ffc..1f4703f52f 100644 --- a/src/prelude/relation.ts +++ b/src/prelude/relation.ts @@ -1,5 +1,5 @@ -export type Predicate<T> = (x: T) => boolean; +export type Predicate<T> = (a: T) => boolean; -export type Relation<T, U> = (x: T, y: U) => boolean; +export type Relation<T, U> = (a: T, b: U) => boolean; export type EndoRelation<T> = Relation<T, T>; |