Skip to main content

Statically typed Python utilities for functional programming.

Project description

oa-utils

Statically typed Python utilities for functional programming.

Pipeline

This class is useful for programming in the collection pipeline style. It wraps a homogenous variadic tuple and exposes a fluent interface with common functional programming operations. Why a tuple and not a "lazy" iterator? Because a tuple is relatively immutable and because, in my opinion, reified collections are much easier to reason about than stateful iterators.

from oa_utils.pipeline import Pipeline

result = (Pipeline(range(10))
            .filter(lambda x: x % 2 == 0)
            .map(lambda x: x * x)
            .sum()) # 120

See pipeline.py for docstrings and doctests of every method.

Project details


Download files

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

Source Distribution

oa_utils-0.1.15.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oa_utils-0.1.15-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file oa_utils-0.1.15.tar.gz.

File metadata

  • Download URL: oa_utils-0.1.15.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.1 Windows/10

File hashes

Hashes for oa_utils-0.1.15.tar.gz
Algorithm Hash digest
SHA256 1ae2c1e489957d755c711cfda88de2616f9acf66e2aa64c279456ec03660abf1
MD5 2e7fd7cfdee6c3ff87adc5d423569576
BLAKE2b-256 f5dfca39e0768a05966f565e9d2b2d9695eea7230db0912b9ccbdf3afd8aa3b7

See more details on using hashes here.

File details

Details for the file oa_utils-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: oa_utils-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.1 Windows/10

File hashes

Hashes for oa_utils-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 0836c8383c97e6f06cfae61d01b11f884830378802fadf85ebde353eeae71ca5
MD5 cc1e53666a646ce227c7714f7ed665a8
BLAKE2b-256 9e4caac4ef3283c4fbb638958b846e0fd70b9a9e8598152b0c9a5c115db496bd

See more details on using hashes here.

Supported by

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