toolshed-0.17.0.2: 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 foldable, Ord a) => foldable a -> [[a]] Source #

A specific instance of gatherBy.

gatherBy Source #

Arguments

:: (Foldable foldable, Ord b) 
=> (a -> b)

Function to apply before testing for equality.

-> foldable a

The input data.

-> [[a]] 
  • 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 foldable, Ord a) => foldable a -> Bool Source #

Whether the specified collection contains any equal items.