mmsyn5-0.3.0.0: Various additional operations on lists (some with intermediate Monads)

Copyright(c) OleksandrZhabenko 2019
LicenseMIT
Maintainerolexandr543@yahoo.com
Safe HaskellSafe
LanguageHaskell2010

Data.List.InnToOut

Contents

Description

Various additional operations on lists. Some of them have additional intermediate Monads inside.

Synopsis
  • mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]
  • mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]
  • mapI22 :: (a -> Bool) -> (a -> b) -> (b -> d) -> (a -> c) -> (c -> d) -> [a] -> [d]
  • mapI12 :: (a -> Bool) -> (a -> c) -> (a -> b) -> (b -> c) -> [a] -> [c]
  • mapI21 :: (a -> Bool) -> (a -> b) -> (b -> c) -> (a -> c) -> [a] -> [c]
  • mapI22M :: Monad m => (a -> Bool) -> (a -> b) -> (b -> d) -> (a -> m c) -> (m c -> d) -> [a] -> [d]
  • mapI2M2 :: Monad m => (a -> Bool) -> (a -> m b) -> (m b -> d) -> (a -> c) -> (c -> d) -> [a] -> [d]
  • mapI2M2M :: (Monad m0, Monad m) => (a -> Bool) -> (a -> m0 b) -> (m0 b -> d) -> (a -> m c) -> (m c -> d) -> [a] -> [d]
  • mapI12M :: Monad m => (a -> Bool) -> (a -> c) -> (a -> m b) -> (m b -> c) -> [a] -> [c]
  • mapI2M1 :: Monad m => (a -> Bool) -> (a -> m b) -> (m b -> c) -> (a -> c) -> [a] -> [c]

Operations to apply a function that creates an inner list to an element of the outer list

mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a] Source #

Function that applies additional function f :: a -> [a] to a if p a = True

mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b] Source #

Function that applies additional function f :: a -> b to a if p a = True and otherwise another function g :: a -> [b] to [a] to obtain [b]

mapI22 :: (a -> Bool) -> (a -> b) -> (b -> d) -> (a -> c) -> (c -> d) -> [a] -> [d] Source #

Function that can apply two different ways of computing something depending of the predicate value p :: a -> Bool and the structure of transition the data for the [a]. It is used if there are two ways to transform data both of them consists of two applied functoins. Similar to arrow techniques.

mapI12 :: (a -> Bool) -> (a -> c) -> (a -> b) -> (b -> c) -> [a] -> [c] Source #

Function that can apply two different ways of computing something depending of the predicate value p :: a -> Bool and the structure of transition the data for the [a]. It is used if there are two ways to transform data and the first one consists of one function and another -- from two applied consequently ones. Similar to arrow techniques.

mapI21 :: (a -> Bool) -> (a -> b) -> (b -> c) -> (a -> c) -> [a] -> [c] Source #

Function that can apply two different ways of computing something depending of the predicate value p :: a -> Bool and the structure of transition the data for the [a]. It is used if there are two ways to transform data and the first one consists of two applied consequently functions and the second -- from one applied function. Similar to arrow techniques.

Operations to obtain intermediate Monads

mapI22M :: Monad m => (a -> Bool) -> (a -> b) -> (b -> d) -> (a -> m c) -> (m c -> d) -> [a] -> [d] Source #

Variant of the function mapI22 in which the second intermediate result c is in the Monad m.

mapI2M2 :: Monad m => (a -> Bool) -> (a -> m b) -> (m b -> d) -> (a -> c) -> (c -> d) -> [a] -> [d] Source #

Variant of the function mapI22 in which the first intermediate result b is in the Monad m.

mapI2M2M :: (Monad m0, Monad m) => (a -> Bool) -> (a -> m0 b) -> (m0 b -> d) -> (a -> m c) -> (m c -> d) -> [a] -> [d] Source #

Variant of the function mapI22 in which both the intermediate results b and c are in the Monads.

mapI12M :: Monad m => (a -> Bool) -> (a -> c) -> (a -> m b) -> (m b -> c) -> [a] -> [c] Source #

Variant of the function mapI12 in which the second intermediate result b is in the Monad m.

mapI2M1 :: Monad m => (a -> Bool) -> (a -> m b) -> (m b -> c) -> (a -> c) -> [a] -> [c] Source #

Variant of the function mapI21 in which the first intermediate result b is in the Monad m.