Closed Martoon-00 closed 4 years ago
Note that
doctest
currently fails.
Mda. I guess having examples there is not so important? Too lazy to add a function which would make use of (+)
.
I think it's not so important, but apparently you just need to add a corresponding import to the comment starting with $setup
above.
Wow, that's magic. Now I see why this $setup
is needed.
Description
Get rid of unsafe
maximum
,foldr1
, and similar functions. Did it in the same way as done forhead
:Container
typeclass now hassafeMinimum :: t -> Maybe (Element t)
.minimum :: NonEmpty a -> a
.Unsafe
module.One thing which worries me is that now one cannot simply write something like
foldr1 (+) [1..5]
. ConstructingNonEmpty
manually is not pleasant,OverloadedLists
extension is rarely used because it would break many other function calls, e.g.forM [1..5]
. Not sure which solution is best here.Related issues(s)
Fixes #211.
✓ Checklist for your Pull Request
Ideally a PR has all of the checkmarks set.
If something in this list is irrelevant to your PR, you should still set this checkmark indicating that you are sure it is dealt with (be that by irrelevance).
Related changes (conditional)
Tests
Documentation
I checked whether I should update the docs and did so if necessary:
Record your changes
Stylistic guide (mandatory)
[x] My commit history is clean (only contains changes relating to my issue/pull request and no reverted-my-earlier-commit changes) and commit messages start with identifiers of related issues in square brackets.
Example:
[#42] Short commit description
If necessary both of these can be achieved even after the commits have been made/pushed using rebase and squash.