Skip to main content

A functional library for Python.

Project description

Description

This library provides a functional programming interface for Python.

Result

The Result monad handles the three most common cases in programming:

  1. computation succeeded
  2. computation failed
  3. computation valid, but resulted in nothing

Examples

from fpinpy import Result

startValue = Result.of(1).map(lambda x: x + 1).forEachOrFail(lambda x: print(x))

Design

It is based on the work by Pierre-Yves Saumont in his books, Functional Programming in Java (2017) and The Joy of Kotlin (2019).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

fpinpy-1.2.2-py3-none-any.whl (22.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page