cognimeta-utils-0.1.2: Utilities for Cognimeta products (such as perdure). API may change often.

Safe HaskellNone

Cgm.Data.List

Description

 

Documentation

testList :: b -> (a -> [a] -> b) -> [a] -> bSource

class List a whereSource

Associated Types

type Listed a :: *Source

Methods

onList :: b -> (Listed a -> a -> b) -> a -> bSource

consList :: Listed a -> a -> aSource

emptyList :: aSource

Instances

List [a] 

listHead :: List a => a -> Maybe (Listed a)Source

addListContext :: (List a, List c, Listed a ~ Listed c) => a -> [(c, Listed a, a)]Source

foldWithContext :: (List a, List c, Listed a ~ Listed c) => (c -> Listed a -> a -> b -> b) -> b -> a -> bSource

prependReverse :: List a => a -> a -> aSource

listFoldMap :: (List a, Monoid m) => (Listed a -> m) -> a -> mSource

class Sizable a whereSource

Methods

countDown :: Int -> a -> Maybe IntSource

maybeMaximumBy :: Foldable l a => (a -> a -> Ordering) -> l -> Maybe aSource

maxBy :: (a -> a -> Ordering) -> a -> a -> aSource

unfoldlE :: (b -> Either c (b, a)) -> b -> (c, [a])Source

unfoldrE :: (b -> Either c (a, b)) -> b -> ([a], c)Source