diff --git a/packages/fpdart/CHANGELOG.md b/packages/fpdart/CHANGELOG.md index 49ad3fa..73c07b1 100644 --- a/packages/fpdart/CHANGELOG.md +++ b/packages/fpdart/CHANGELOG.md @@ -1,10 +1,25 @@ -## v1.1.0-dev +## v1.1.0 - 13 August 2023 -- Added `lookupEq` and `dropRight` on `Iterable`. -- Added `lookupKeyEq` on `Map`. -- Some optimization. +- Improved performance of some iterable based functions in `Iterable` and `Map` extension (thanks to [lrhn](https://github.com/lrhn) 🎉) -## v1.0.0-beta.1 - 27 May 2023 +- Added `lookupEq` and `dropRight` on `Iterable` extension +```dart +[].lookupEq(Eq.eqInt, 5) // None() +[1, 2, 3, 4].lookupEq(Eq.eqInt, 5) // None() +[1, 2, 3, 4].lookupEq(Eq.eqInt, 3) // Some(3) +[1, 6, 4, 3, 2].lookupEq(Eq.by((n) => n % 3, Eq.eqInt), 0) // Some(6) + +[1, 2].dropRight(3) // [] +[1, 2, 3, 4].dropRight(1) // [1, 2, 3] +``` + +- Added `lookupKeyEq` on `Map` extension +```dart +{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'b'); // Some('b') +{'a': 1, 'b': 2, 'c': 3, 'd': 4}.lookupKeyEq(Eq.eqString, 'e'); // None() +``` + +## v1.0.0 - 27 May 2023 - Minimum environment dart sdk to `3.0.0` ⚠️ (Dart 3️⃣) ```yaml environment: diff --git a/packages/fpdart/README.md b/packages/fpdart/README.md index fdddc6a..162a22a 100644 --- a/packages/fpdart/README.md +++ b/packages/fpdart/README.md @@ -117,7 +117,7 @@ Interested in what `fpdart` is and how it came to be? ```yaml # pubspec.yaml dependencies: - fpdart: ^1.0.0 # Check out the latest version + fpdart: ^1.1.0 ``` ## ✨ Examples @@ -483,6 +483,7 @@ In general, **any contribution or feedback is welcome** (and encouraged!). ## 📃 Versioning +- v1.1.0 - 13 August 2023 - **v1.0.0** - 26 July 2023 *** diff --git a/packages/fpdart/pubspec.yaml b/packages/fpdart/pubspec.yaml index e91a706..9f4b550 100644 --- a/packages/fpdart/pubspec.yaml +++ b/packages/fpdart/pubspec.yaml @@ -2,7 +2,7 @@ name: fpdart description: > Functional programming in Dart and Flutter. All the main functional programming types and patterns fully documented, tested, and with examples. -version: 1.0.0 +version: 1.1.0 homepage: https://www.sandromaglione.com/ repository: https://github.com/SandroMaglione/fpdart author: Maglione Sandro diff --git a/packages/fpdart/test/src/extension/iterable_extension_test.dart b/packages/fpdart/test/src/extension/iterable_extension_test.dart index 07af4eb..27cd7de 100644 --- a/packages/fpdart/test/src/extension/iterable_extension_test.dart +++ b/packages/fpdart/test/src/extension/iterable_extension_test.dart @@ -451,7 +451,7 @@ void main() { test('found first', () { var findMod3 = - [1, 6, 4, 3, 2].lookupEq(Eq.by((int n) => n % 3, Eq.eqInt), 0); + [1, 6, 4, 3, 2].lookupEq(Eq.by((n) => n % 3, Eq.eqInt), 0); expect(findMod3, isA()); expect(findMod3.getOrElse(() => throw "not"), 6); });