Skip to content

Commit 7e264fd

Browse files
Fix minor documentation issue with find (#216)
* Fix documentation of find Co-authored-by: Thomas Honeyman <[email protected]>
1 parent c0aa317 commit 7e264fd

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ New features:
1111
Bugfixes:
1212

1313
Other improvements:
14+
- Fixed minor documention issue with `find` (#216 by @JamieBallingall)
1415

1516
## [v6.0.1](https://github.com/purescript/purescript-arrays/releases/tag/v6.0.1) - 2021-04-19
1617

@@ -26,7 +27,7 @@ Breaking changes:
2627

2728
New features:
2829
- Added specialized versions of the functions from `Data.Foldable` (#201):
29-
- Added `foldl`, `foldr`, `foldMap`, `fold`, `intercalate` to `Array`
30+
- Added `foldl`, `foldr`, `foldMap`, `fold`, `intercalate` to `Array`
3031
- Added `foldl1`, `foldr1`, `foldMap1`, `foldl1`, `intercalate` to `Array.NonEmpty`
3132
- Added specialized `elem`, `notElem`, `find`, `findMap`, `scanl`, `scanr`, `any`, `all` (#189, #193, #201)
3233
- Added `intersperse`, `groupAllBy`, `splitAt` (#179, #188, #194, #200, #201)
@@ -41,9 +42,9 @@ Other improvements:
4142
- Migrated to GitHub Actions for CI (#187, #169)
4243
- Removed some internal usages of `unsafeCoerce` (#184)
4344
- Changed `foldM` type signature to more closely match `foldl` (#160)
44-
- Updated installation instructions to use Spago (#171)
45+
- Updated installation instructions to use Spago (#171)
4546
- Replaced foreign `cons`, `snoc`, `drop`, `take` with PureScript implementations (#180)
46-
- Removed `return {}` from FFI function for a small performance boost (#175)
47+
- Removed `return {}` from FFI function for a small performance boost (#175)
4748
- Bumped pulp version (#174)
4849
- Removed primes from foreign modules exports (#168)
4950

@@ -311,9 +312,4 @@ Added `mapMaybe`
311312

312313
## [v0.1.1](https://github.com/purescript/purescript-arrays/releases/tag/v0.1.1) - 2014-04-27
313314

314-
315-
316315
## [v0.1.0](https://github.com/purescript/purescript-arrays/releases/tag/v0.1.0) - 2014-04-25
317-
318-
319-

src/Data/Array.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,8 @@ elemLastIndex x = findLastIndex (_ == x)
444444
-- | Find the first element for which a predicate holds.
445445
-- |
446446
-- | ```purescript
447-
-- | findIndex (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just "bb"
448-
-- | findIndex (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing
447+
-- | find (contains $ Pattern "b") ["a", "bb", "b", "d"] = Just "bb"
448+
-- | find (contains $ Pattern "x") ["a", "bb", "b", "d"] = Nothing
449449
-- | ```
450450
find :: forall a. (a -> Boolean) -> Array a -> Maybe a
451451
find f xs = unsafePartial (unsafeIndex xs) <$> findIndex f xs

0 commit comments

Comments
 (0)