Curried decorator
Project description
Simplecurry’s curried provides a simple way to use curried functions in Python. There are alternative implementations, but they are unnecessarily complex.
Example
This is an example on how to use it:
from simplecurry import curried @curried def add(a, b, c): return a + b + c add(1)(2)(3) # Returns 6 add(1, 2)(3) # Returns 6 add(1)(2, 3) # Returns 6 add(1, 2, 3) # Returns 6
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
simplecurry-1.11.tar.gz
(1.3 kB
view details)
File details
Details for the file simplecurry-1.11.tar.gz
.
File metadata
- Download URL: simplecurry-1.11.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d47c34761e3cc344ebaa3abe28c6e9b48ef61114fd9752319016860d9d3f652 |
|
MD5 | 089daf9b5c0677c5d6a81c4fcc86ccab |
|
BLAKE2b-256 | f3719c571f9e433b61f7cd1cf6bde34a225508aac053f943ba4860509fe8f1b6 |