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

incomplete partialFree definition #24

Open
reverie opened this issue Jan 21, 2013 · 0 comments
Open

incomplete partialFree definition #24

reverie opened this issue Jan 21, 2013 · 0 comments

Comments

@reverie
Copy link

reverie commented Jan 21, 2013

on http://autotelicum.github.com/Smooth-CoffeeScript/literate/partial.html, you have:

partialFree = (func, a...) -> (b...) -> func (for arg in a then arg ?= b.shift())...

this could be improved to include any remaining variables from b:

partialFree = (func, a...) -> (b...) -> func (for arg in a then arg ?= b.shift())..., b...

In fact, that's how I assumed it worked, and it took me a while to find my bug.

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

1 participant