Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function like apply in scheme but for kwargs. #439

Closed
akhilman opened this issue Jan 21, 2019 · 1 comment
Closed

Add function like apply in scheme but for kwargs. #439

akhilman opened this issue Jan 21, 2019 · 1 comment

Comments

@akhilman
Copy link

Realisztion could be:

def applykw(func, kwargs):
    return func(**kwargs)

Usage:

>>> list(map(curry(applykw)(lambda x, y: x + y), [{'x':10, 'y':1}, {'x':20, 'y':2}]))
[11, 22]
@eriknw
Copy link
Member

eriknw commented Jul 9, 2019

Added apply in #411. Thanks for the proposal @akhilman. Users are free to define simple variations on their own.

@eriknw eriknw closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants