From c965bbef4fad386a0a060d1fa3122a924c7a66c4 Mon Sep 17 00:00:00 2001 From: Jamie Ballingall Date: Tue, 21 Sep 2021 21:25:18 -0400 Subject: [PATCH 1/3] Fix documentation of find --- src/Data/Array.purs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Array.purs b/src/Data/Array.purs index b7d2cf8..d329594 100644 --- a/src/Data/Array.purs +++ b/src/Data/Array.purs @@ -444,8 +444,8 @@ elemLastIndex x = findLastIndex (_ == x) -- | Find the first element for which a predicate holds. -- | -- | ```purescript --- | findIndex (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just "bb" --- | findIndex (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing +-- | find (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just "bb" +-- | find (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing -- | ``` find :: forall a. (a -> Boolean) -> Array a -> Maybe a find f xs = unsafePartial (unsafeIndex xs) <$> findIndex f xs From b32ef88fc16438d4d46c53c10c00d99949335abc Mon Sep 17 00:00:00 2001 From: Jamie Ballingall Date: Tue, 21 Sep 2021 21:33:41 -0400 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c6bb4..2bdb733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Fixed minor documention issue with `find` ## [v6.0.1](https://github.com/purescript/purescript-arrays/releases/tag/v6.0.1) - 2021-04-19 @@ -26,7 +27,7 @@ Breaking changes: New features: - Added specialized versions of the functions from `Data.Foldable` (#201): - - Added `foldl`, `foldr`, `foldMap`, `fold`, `intercalate` to `Array` + - Added `foldl`, `foldr`, `foldMap`, `fold`, `intercalate` to `Array` - Added `foldl1`, `foldr1`, `foldMap1`, `foldl1`, `intercalate` to `Array.NonEmpty` - Added specialized `elem`, `notElem`, `find`, `findMap`, `scanl`, `scanr`, `any`, `all` (#189, #193, #201) - Added `intersperse`, `groupAllBy`, `splitAt` (#179, #188, #194, #200, #201) @@ -41,9 +42,9 @@ Other improvements: - Migrated to GitHub Actions for CI (#187, #169) - Removed some internal usages of `unsafeCoerce` (#184) - Changed `foldM` type signature to more closely match `foldl` (#160) -- Updated installation instructions to use Spago (#171) +- Updated installation instructions to use Spago (#171) - Replaced foreign `cons`, `snoc`, `drop`, `take` with PureScript implementations (#180) -- Removed `return {}` from FFI function for a small performance boost (#175) +- Removed `return {}` from FFI function for a small performance boost (#175) - Bumped pulp version (#174) - Removed primes from foreign modules exports (#168) @@ -314,6 +315,3 @@ Added `mapMaybe` ## [v0.1.0](https://github.com/purescript/purescript-arrays/releases/tag/v0.1.0) - 2014-04-25 - - - From 6889e2a08d2a845d083b965ad2fc4573d1c47249 Mon Sep 17 00:00:00 2001 From: Thomas Honeyman Date: Wed, 22 Sep 2021 11:15:07 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bdb733..8a7ec3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ New features: Bugfixes: Other improvements: -- Fixed minor documention issue with `find` +- Fixed minor documention issue with `find` (#216 by @JamieBallingall) ## [v6.0.1](https://github.com/purescript/purescript-arrays/releases/tag/v6.0.1) - 2021-04-19 @@ -312,6 +312,4 @@ Added `mapMaybe` ## [v0.1.1](https://github.com/purescript/purescript-arrays/releases/tag/v0.1.1) - 2014-04-27 - - ## [v0.1.0](https://github.com/purescript/purescript-arrays/releases/tag/v0.1.0) - 2014-04-25