Skip to content

Add First and Last wrappers around Maybe to Data.Monoid

First and Last mappend to the first and last non-Nothing elements of the input. These instances seem to fit with the other simple instances in this file and are useful, for example, to turn foldMap into findFirst or findLast, or to get a really trivial Writer monad.

Trac metadata
Trac field Value
Version 6.6
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/base
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information