mmsyn5-0.6.0.0: Various additional operations on lists (some with intermediate Monads)
Copyright(c) Oleksandr Zhabenko 2019-2023
LicenseMIT
Maintaineroleksandr.zhabenko@yahoo.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.List.InnToOut.Basic

Description

Various additional operations on lists

Synopsis
  • mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]
  • mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]

Operations to apply a function or two different functions to an element of the outer list (some of them create inner list)

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

Function that applies additional function f :: a -> [a] to a if p :: a -> Bool and 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 -> Bool and p a = True and otherwise another function g :: a -> [b] to [a] and combines results to obtain [b]