The Wayback Machine - https://web.archive.org/web/20201001013815/https://github.com/junhoyeo/chaining
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

ChainedArray

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

About

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

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.