precis-0.5.0: Diff Cabal packages.

Portabilityto be determined.
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Precis.Utils.Common

Contents

Description

Utils

Synopsis

Hughes list

type H a = [a] -> [a]Source

wrapH :: a -> H aSource

consH :: a -> H a -> H aSource

snocH :: H a -> a -> H aSource

appendH :: H a -> H a -> H aSource

veloH :: (a -> b) -> [a] -> H bSource

Traverse a list as per map applying the supplied function to each element, *but* pruduce a Hughes list as output.

concatH :: [H a] -> H aSource

toListH :: H a -> [a]Source

fromListH :: [a] -> H aSource

Others

mapLeft :: (a -> s) -> Either a b -> Either s bSource

mapRight :: (b -> t) -> Either a b -> Either a tSource

onSuccessM :: Monad m => m (Either a b) -> (b -> m c) -> m (Either a c)Source

pstar :: (a -> r -> ans) -> (r -> a) -> r -> ansSource

pstar2 :: (a -> b -> r -> ans) -> (r -> a) -> (r -> b) -> r -> ansSource

star :: (r -> a) -> (a -> r -> ans) -> r -> ansSource

star2 :: (r -> a) -> (r -> b) -> (a -> b -> r -> ans) -> r -> ansSource