toolshed-0.16.0.0: Ill-defined library.

Safe HaskellSafe
LanguageHaskell2010

ToolShed.Data.Foldable

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Miscellaneous polymorphic operations on Foldable types.

Synopsis

Functions

gather :: (Foldable f, Ord a) => f a -> [[a]] Source

A specific instance of gatherBy.

gatherBy :: (Foldable f, Ord b) => (a -> b) -> f a -> [[a]] Source

  • Group equal (though not necessarily adjacent; cf. groupBy) elements, according to the specified comparator.
  • The groups are returned in ascending order, whilst their elements remain in their original order.

Predicates

hasDuplicates :: (Foldable f, Ord a) => f a -> Bool Source

Whether the specified collection contains any equal items.