Skip to content

Instantly share code, notes, and snippets.

View jtraub's full-sized avatar

Konstantin Mikhailov jtraub

  • 17:01 (UTC +10:00)
View GitHub Profile
@jtraub
jtraub / curry.py
Last active December 14, 2022 16:30
Implement curry decorator in Python
from inspect import signature
class Applicator:
def __init__(self, fn, total_args, args=None):
self.fn = fn
self.total_args = total_args
self.args = [] if args is None else args
def __call__(self, *args):