packages feed

subG 0.5.1.0 → 0.5.2.0

raw patch · 4 files changed

+8/−4 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.SubG.Unfold: unfoldG :: (InsertLeft t a, Monoid (t a)) => (a -> Maybe (a, a)) -> a -> t a
+ Data.SubG.Unfold: unfoldG :: (InsertLeft t a, Monoid (t a)) => (b -> Maybe (a, b)) -> b -> t a

Files

CHANGELOG.md view
@@ -47,3 +47,7 @@ ## 0.5.1.0 -- 2021-06-28  * Fifth version revised A. Changed the code for Data.SubG.Unfold.unfoldG function influenced more by the Data.List.unfoldr code.++## 0.5.2.0 -- 2021-06-28++* Fifth version revised A. Changed the code for Data.SubG.Unfold.unfoldG to be more general.
Data/SubG/Unfold.hs view
@@ -21,10 +21,10 @@ -- that is available at the URL: https://www.cs.nott.ac.uk/~pszgmh/fold.pdf. -- Also inspired by: https://www.works-hub.com/learn/number-anamorphisms-aka-unfolds-explained-50e1a by Marty Stumpf. -- Generalizes the 'Data.List.unfoldr' function not only for lists, but for the data type that has 'InsertLeft' and 'Monoid' instances.-unfoldG :: (InsertLeft t a, Monoid (t a)) => (a -> Maybe (a, a)) -> a -> t a+unfoldG :: (InsertLeft t a, Monoid (t a)) => (b -> Maybe (a, b)) -> b -> t a unfoldG p x =  case p x of-   Just (y, z) -> x %@ unfoldG p z+   Just (y, z) -> y %@ unfoldG p z    Nothing -> mempty  -- | Inspired by: https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.OldList.html#words
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020 OleksandrZhabenko+Copyright (c) 2020-2021 OleksandrZhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
subG.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/  name:                subG-version:             0.5.1.0+version:             0.5.2.0 synopsis:            Some extension to the Foldable and Monoid classes. description:         Introduces a new class InsertLeft -- the class of types of values that can be inserted from the left to the Foldable structure that is a data that is also the Monoid instance. Also contains some functions to find out both minimum and maximum elements of the finite Foldable structures. homepage:            https://hackage.haskell.org/package/subG