packages feed

mmsyn5 0.2.0.0 → 0.2.1.0

raw patch · 4 files changed

+32/−28 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.List.Nth: mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]
- Data.List.Nth: mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]
+ Data.List.InnToOut: mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]
+ Data.List.InnToOut: mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]

Files

ChangeLog.md view
@@ -27,4 +27,8 @@  * Second version. Changed the basic idea of what operations are included. +## 0.2.1.0 -- 2019-11-04++* Second version revised A. Changed the name of the module.+ 
+ Data/List/InnToOut.hs view
@@ -0,0 +1,26 @@+-- |+-- Module      :  Data.List.InnToOut+-- Copyright   :  (c) OleksandrZhabenko 2019+-- License     :  MIT+--+-- Maintainer  :  olexandr543@yahoo.com+--+-- Various additional operations on lists.+--++module Data.List.InnToOut +  (+    -- * Operation to apply a function that creates an inner list to an element of the outer list   +       mapI+       , mapI2+  ) where++-- | Function that applies additional function @f :: a -> [a]@ to @a@ if @p a = True@+mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]+mapI p f = concatMap (\x -> if p x then f x else [x])+{-#INLINE mapI#-}++-- | 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]@+mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]+mapI2 p f g = concatMap (\x -> if p x then [f x] else g x)+{-#INLINE mapI2#-}
− Data/List/Nth.hs
@@ -1,26 +0,0 @@--- |--- Module      :  Data.List.Nth--- Copyright   :  (c) OleksandrZhabenko 2019--- License     :  MIT------ Maintainer  :  olexandr543@yahoo.com------ Various additional operations on lists.-----module Data.List.Nth -  (-    -- * Operation to apply a function that creates an inner list to an element of the outer list   -       mapI-       , mapI2-  ) where---- | Function that applies additional function @f :: a -> [a]@ to @a@ if @p a = True@-mapI :: (a -> Bool) -> (a -> [a]) -> [a] -> [a]-mapI p f = concatMap (\x -> if p x then f x else [x])-{-#INLINE mapI#-}---- | 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]@-mapI2 :: (a -> Bool) -> (a -> b) -> (a -> [b]) -> [a] -> [b]-mapI2 p f g = concatMap (\x -> if p x then [f x] else g x)-{-#INLINE mapI2#-}
mmsyn5.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                mmsyn5-version:             0.2.0.0+version:             0.2.1.0 synopsis:            Various additional operations on lists description:         A small library to deal with a little bit more complex operations on lists than Data.List module homepage:            http://hackage.haskell.org/package/mmsyn5@@ -17,7 +17,7 @@ cabal-version:       >=1.10  library-  exposed-modules:     Data.List.Nth+  exposed-modules:     Data.List.InnToOut   -- other-modules:   -- other-extensions:   build-depends:       base >=4.7 && <4.14