From 82bc860363ea32057b9b09f75fc9d52e6cb3ee27 Mon Sep 17 00:00:00 2001 From: gcanti Date: Mon, 13 Sep 2021 11:45:36 +0200 Subject: [PATCH] version 2.11.2 --- CHANGELOG.md | 5 ++ package.json | 2 +- src/Ord.ts | 4 +- src/ReadonlyRecord.ts | 140 +++++++++++++++++++++++++++++++----------- src/Record.ts | 140 +++++++++++++++++++++++++++++++----------- 5 files changed, 219 insertions(+), 72 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9b6571e..ae963c1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ **Note**: A feature tagged as Experimental is in a high state of flux, you're at risk of it changing without notice. +# 2.11.2 + +- **Polish** + - Add/fix pure comments, #1555 (@OliverJAsh) + # 2.11.1 - **Deprecation** diff --git a/package.json b/package.json index eb89c4bc2..79322c8d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fp-ts", - "version": "2.11.1", + "version": "2.11.2", "description": "Functional programming in TypeScript", "main": "lib/index.js", "module": "es6/index.js", diff --git a/src/Ord.ts b/src/Ord.ts index 7adebc115..00b5d8fed 100644 --- a/src/Ord.ts +++ b/src/Ord.ts @@ -233,7 +233,9 @@ export const Contravariant: Contravariant1 = { */ export const trivial: Ord = { equals: constTrue, - compare: /*#__PURE__*/ constant(0) + compare: + /*#__PURE__*/ + constant(0) } /** diff --git a/src/ReadonlyRecord.ts b/src/ReadonlyRecord.ts index 606952530..ab1b663df 100644 --- a/src/ReadonlyRecord.ts +++ b/src/ReadonlyRecord.ts @@ -1517,9 +1517,15 @@ export const getDifferenceMagma = (): Magma> => ({ */ export const Foldable: Foldable1 = { URI, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord) + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord) } /** @@ -1531,12 +1537,24 @@ export const Foldable: Foldable1 = { */ export const FoldableWithIndex: FoldableWithIndex1 = { URI, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord) + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord) } /** @@ -1549,10 +1567,18 @@ export const FoldableWithIndex: FoldableWithIndex1 = { export const Traversable: Traversable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence } @@ -1567,19 +1593,39 @@ export const TraversableWithIndex: TraversableWithIndex1 = { URI, map: _map, mapWithIndex: _mapWithIndex, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, - traverseWithIndex: /*#__PURE__*/ _traverseWithIndex(S.Ord) + traverseWithIndex: + /*#__PURE__*/ + _traverseWithIndex(S.Ord) } -const _wither = /*#__PURE__*/ witherDefault(Traversable, Compactable) -const _wilt = /*#__PURE__*/ wiltDefault(Traversable, Compactable) +const _wither = + /*#__PURE__*/ + witherDefault(Traversable, Compactable) +const _wilt = + /*#__PURE__*/ + wiltDefault(Traversable, Compactable) /** * Use `getWitherable` instead. @@ -1591,10 +1637,18 @@ const _wilt = /*#__PURE__*/ wiltDefault(Traversable, Compactable) export const Witherable: Witherable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, compact, separate, @@ -1640,10 +1694,18 @@ export const readonlyRecord: FunctorWithIndex1 & Witherable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, compact, separate, @@ -1652,14 +1714,22 @@ export const readonlyRecord: FunctorWithIndex1 & partition: _partition, partitionMap: _partitionMap, mapWithIndex: _mapWithIndex, - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord), filterMapWithIndex: _filterMapWithIndex, filterWithIndex: _filterWithIndex, partitionMapWithIndex: _partitionMapWithIndex, partitionWithIndex: _partitionWithIndex, - traverseWithIndex: /*#__PURE__*/ _traverseWithIndex(S.Ord), + traverseWithIndex: + /*#__PURE__*/ + _traverseWithIndex(S.Ord), wither: _wither, wilt: _wilt } diff --git a/src/Record.ts b/src/Record.ts index 29ff6f78a..11d481f49 100644 --- a/src/Record.ts +++ b/src/Record.ts @@ -1024,9 +1024,15 @@ export const getDifferenceMagma = (): Magma> => ({ */ export const Foldable: Foldable1 = { URI, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord) + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord) } /** @@ -1038,12 +1044,24 @@ export const Foldable: Foldable1 = { */ export const FoldableWithIndex: FoldableWithIndex1 = { URI, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord) + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord) } /** @@ -1056,10 +1074,18 @@ export const FoldableWithIndex: FoldableWithIndex1 = { export const Traversable: Traversable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence } @@ -1074,19 +1100,39 @@ export const TraversableWithIndex: TraversableWithIndex1 = { URI, map: _map, mapWithIndex: _mapWithIndex, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, - traverseWithIndex: /*#__PURE__*/ _traverseWithIndex(S.Ord) + traverseWithIndex: + /*#__PURE__*/ + _traverseWithIndex(S.Ord) } -const _wither = /*#__PURE__*/ witherDefault(Traversable, Compactable) -const _wilt = /*#__PURE__*/ wiltDefault(Traversable, Compactable) +const _wither = + /*#__PURE__*/ + witherDefault(Traversable, Compactable) +const _wilt = + /*#__PURE__*/ + wiltDefault(Traversable, Compactable) /** * Use `getWitherable` instead. @@ -1098,10 +1144,18 @@ const _wilt = /*#__PURE__*/ wiltDefault(Traversable, Compactable) export const Witherable: Witherable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, compact, separate, @@ -1151,10 +1205,18 @@ export const record: FunctorWithIndex1 & Witherable1 = { URI, map: _map, - reduce: /*#__PURE__*/ _reduce(S.Ord), - foldMap: /*#__PURE__*/ _foldMap(S.Ord), - reduceRight: /*#__PURE__*/ _reduceRight(S.Ord), - traverse: /*#__PURE__*/ _traverse(S.Ord), + reduce: + /*#__PURE__*/ + _reduce(S.Ord), + foldMap: + /*#__PURE__*/ + _foldMap(S.Ord), + reduceRight: + /*#__PURE__*/ + _reduceRight(S.Ord), + traverse: + /*#__PURE__*/ + _traverse(S.Ord), sequence, compact, separate, @@ -1163,14 +1225,22 @@ export const record: FunctorWithIndex1 & partition: _partition, partitionMap: _partitionMap, mapWithIndex: _mapWithIndex, - reduceWithIndex: /*#__PURE__*/ _reduceWithIndex(S.Ord), - foldMapWithIndex: /*#__PURE__*/ _foldMapWithIndex(S.Ord), - reduceRightWithIndex: /*#__PURE__*/ _reduceRightWithIndex(S.Ord), + reduceWithIndex: + /*#__PURE__*/ + _reduceWithIndex(S.Ord), + foldMapWithIndex: + /*#__PURE__*/ + _foldMapWithIndex(S.Ord), + reduceRightWithIndex: + /*#__PURE__*/ + _reduceRightWithIndex(S.Ord), filterMapWithIndex: _filterMapWithIndex, filterWithIndex: _filterWithIndex, partitionMapWithIndex: _partitionMapWithIndex, partitionWithIndex: _partitionWithIndex, - traverseWithIndex: /*#__PURE__*/ _traverseWithIndex(S.Ord), + traverseWithIndex: + /*#__PURE__*/ + _traverseWithIndex(S.Ord), wither: _wither, wilt: _wilt }