subG-0.1.0.0: Some extension to the Foldable and Monoid classes.

Copyright(c) OleksandrZhabenko 2020
LicenseMIT
StabilityExperimental
Safe HaskellSafe
LanguageHaskell2010

Data.SubG

Description

Maintainer : olexandr543@yahoo.com

Synopsis

Documentation

subG :: (InsertLeft t a, Monoid (t a), Monoid (t (t a))) => t a -> t a -> t (t a) Source #

Inspired by: 'https://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.OldList.html#words' and Graham Hutton. A tutorial on the universality and expressiveness of fold. J. Functional Programming 9 (4): 355–372, July 1999. that is available at the URL: 'https://www.cs.nott.ac.uk/~pszgmh/fold.pdf'.

dropWhile :: (InsertLeft t a, Monoid (t a)) => (a -> Bool) -> t a -> t a Source #

takeWhile :: (InsertLeft t a, Monoid (t a)) => (a -> Bool) -> t a -> t a Source #

span :: (InsertLeft t a, Monoid (t a)) => (a -> Bool) -> t a -> (t a, t a) Source #

preAppend :: (InsertLeft t a, Monoid (t (t a))) => t a -> t (t a) -> t (t a) -> t (t a) Source #

Prepends and appends the given two first arguments to the third one.