Data.List.Safe

Safe versions of standard functions.

head

last

tail

init

foldl1

foldl1'

foldr1

maximum

minimum

maximumBy

minimumBy

(!!)

Generic wrapper for partial functions.

wrap

Exceptions for empty lists and negative indices.

data EmptyListException

data NegativeIndexException