Skip to main content

Package that implements functional chaining in Python, which behaves like JavaScript

Project description

⛓ Chaining

made-with-python PyPI pyversions MIT LICENSE PyPI version PyPI monthly downloads

Package that implements functional chaining in Python, which behaves like JavaScript

📦 Installation

This package is not ready to be used in production; There are lots of things still left to be implemented and optimized!

# only python 3.6 or newer
pip3 install chaining

🔥 Action

ChainList

>>> from chaining import ChainList
>>> array = ChainList([1, 2, 3])
>>> array.length
3
>>> array.map(lambda item: item * 2)
<ChainList [2, 4, 6]>
>>> other_array = ChainList._from('chain').map(lambda item, idx: ord(item) + idx)
>>> other_array.iterable
[99, 105, 99, 108, 114]
>>> array.concat(other_array)
<ChainList [1, 2, 3, 99, 105, 99, 108, 114]>

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

chaining-0.0.2-py3-none-any.whl (3.8 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