toml-reader-0.1.0.0: TOML format parser compliant with v1.0.0.
Safe HaskellSafe-Inferred
LanguageHaskell2010

TOML.Utils.NonEmpty

Synopsis

Documentation

zipHistory :: NonEmpty a -> NonEmpty (NonEmpty a, a) Source #

Annotates each element with the history of all past elements.

>>> zipHistory ["a", "b", "c"]
[(["a"], "a"), (["a", "b"], "b"), (["a", "b", "c"], "c")]