Quick actions

cmd+k|ctrl+k

Navigation

Languages

currying

Snippet info

Language

Python

Visibility

public

Author

gordonchu88

Created

2024-10-16T01:00:21.437111Z

Updated

2024-10-16T01:37:15.259258Z

def f(state_tax, city_tax, income):
    return (state_tax + city_tax) * income
    
def f1(state_tax=0.15):
    def f2(city_tax=0.1):
        def f3(income):
            return f(state_tax, city_tax, income)
        return f3
    return f2

print(f1()()(100) )
print(f1(0.2)(0.2)(100))
INFO