Skip to content

Commit

Permalink
Renamed latest to lastDef
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriella439 committed Jun 14, 2014
1 parent 591c64a commit 19c1199
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Control/Foldl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module Control.Foldl (
, foldMap
, head
, last
, latest
, lastDef
, null
, length
, and
Expand Down Expand Up @@ -240,9 +240,9 @@ last = Fold (\_ -> Just') Nothing' lazy
{-| Get the last element of a container or return a default value if the container
is empty
-}
latest :: a -> Fold a a
latest a = Fold (\_ a' -> a') a id
{-# INLINABLE latest #-}
lastDef :: a -> Fold a a
lastDef a = Fold (\_ a' -> a') a id
{-# INLINABLE lastDef #-}

-- | Returns 'True' if the container is empty, 'False' otherwise
null :: Fold a Bool
Expand Down

0 comments on commit 19c1199

Please sign in to comment.