Metadata-Version: 2.1
Name: grscheller.fp
Version: 0.1.0
Summary: Functional programming tools which endeavor to be Pythonic.
Keywords: functional,functional programming,fp,monad,iterators,maybe,either
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Apache Software License
Requires-Dist: pytest >=7.4 ; extra == "test"
Project-URL: Changelog, https://github.com/grscheller/fp/blob/main/CHANGELOG.md
Project-URL: Documentation, https://grscheller.github.io/fp/
Project-URL: Source, https://github.com/grscheller/fp
Provides-Extra: test

# Python Functional Programming (FP) Package 

Functional programming tools which endeavor to be Pythonic.

## Overview

* Source code for the grscheller.fp PyPI Package
* [grscheller.fp][1] project on PyPI
* [Detailed API documentation][2] on GH-Pages
* [Source code][3] on GitHub

### Benefits of FP

* avoid exception driven code paths
* data sharing becomes trivial due to immutability

### Modules

* module grscheller.fp.wo\_exception
  * class `MB[T](t: Optional[T])`
    * the maybe monad
    * represents a potentially missing value
      * result of a calculation that could fail
      * user input which could be missing
  * class `XOR[L, R](left: Optional[L], right: R)`
    * the either monad
    * one of two possible exclusive categories of values
    * either one or the other, not both
    * left biased
* module grscheller.fp.iterators
  * Functions for combining multiple iterators
    * function `concat(*t: [Iterable[T]]): Iterator[T]`
      * sequentially concatenate multiple iterables
      * you may want to use the standard lib's itertools.chain instead
      * still performant
    * function `exhaust(*t: [Iterable[T]]): Iterator[T]`
      * merge iterables until all are exhausted
    * function `merge(*t: [Iterable[T]]): Iterator[T]`
      * merge iterables until one is exhausted

---

[1]: https://pypi.org/project/grscheller.fp/
[2]: https://grscheller.github.io/fp/
[3]: https://github.com/grscheller/fp/

