Skip to content

Commit

Permalink
[#221] Add unsafe versions of "1" functions
Browse files Browse the repository at this point in the history
Problem: sometimes user is completely sure that his structure is not
empty, he may want to use the original `foldr1` and `maximum` from
`Data.List`.

Solution: make those and similar functions be provided in `Unsafe`
module.
  • Loading branch information
Martoon-00 committed Jun 2, 2020
1 parent cb51b8e commit 0f32c20
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Universum/Unsafe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ module Universum.Unsafe
, at
, (!!)
, fromJust
, foldr1
, foldl1
, minimum
, maximum
, minimumBy
, maximumBy
) where

import Data.List (head, init, last, tail, (!!))
import Data.List (foldl1, foldr1, head, init, last, maximum, maximumBy, minimum, minimumBy, tail,
(!!))
import Data.Maybe (fromJust)

import Universum.Base (Int)
Expand Down

0 comments on commit 0f32c20

Please sign in to comment.