Package that implements functional chaining in Python, which behaves like JavaScript
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
>>> 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]>