https://github.com/junhoyeo/chaining
⛓ Package that implements functional chaining in Python, which behaves like JavaScript
https://github.com/junhoyeo/chaining
chaining
Last synced: 5 months ago
JSON representation
⛓ Package that implements functional chaining in Python, which behaves like JavaScript
- Host: GitHub
- URL: https://github.com/junhoyeo/chaining
- Owner: junhoyeo
- License: mit
- Created: 2020-02-04T15:00:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-09T07:59:37.000Z (over 6 years ago)
- Last Synced: 2026-01-05T00:16:23.669Z (6 months ago)
- Topics: chaining
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⛓ Chaining
[](https://www.python.org/)
[](https://pypi.org/project/chaining/)
[](https://github.com/junhoyeo/chaining/blob/master/LICENSE)
[](https://badge.fury.io/py/chaining)
[](https://pypistats.org/packages/chaining)
> 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!
```bash
# only python 3.6 or newer
pip3 install chaining
```
## 🔥 Action
### ChainedArray
```python
>>> from chaining import ChainedArray
>>> array = ChainedArray([1, 2, 3])
>>> array.length
3
>>> array.map(lambda item: item * 2)
>>> other_array = ChainedArray._from('chain').map(lambda item, idx: ord(item) + idx)
>>> other_array.iterable
[99, 105, 99, 108, 114]
>>> array.concat(other_array)
```