Skip to content

grimborg/simplecurry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple way to use curried functions in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages