Skip to main content

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
simplecurry-1.12.tar.gz (1.3 kB) Copy SHA256 hash SHA256 Source None Sep 28, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page