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

Ch3 - Improve content on curried functions and partial application #261

Closed
milesfrain opened this issue Dec 22, 2020 · 1 comment · Fixed by #451
Closed

Ch3 - Improve content on curried functions and partial application #261

milesfrain opened this issue Dec 22, 2020 · 1 comment · Fixed by #451

Comments

@milesfrain
Copy link
Member

The existing section is not super accessible to FP beginners.
I think we should start with a gentler introduction, maybe stuff like:

add5 = add 5
@milesfrain milesfrain changed the title Improve content on curried functions and partial application Ch3 - Improve content on curried functions and partial application Jan 2, 2021
@milesfrain
Copy link
Member Author

A sequence like this could be a simpler way to introduce curried functions, partial application, and infix operators:

add5 x = 5 + x
add5 x = add 5 x
add5 x = (+) 5 x
add5 x = 5 `add` x
add5   = add 5

I assume the book chose flip and apply as examples because their signatures contain only type variables and no constraints (similar to const, on, compose, etc.), but I'd like to convert to more beginner-friendly alternatives. That change would resolve #260.

We could even move some of the content from these sections (e.g. Curried Functions and Infix Function Application) to the reference docs (proposed in #282 (comment)). But we'd still want to add exercises (#252) for that material, even if we're just linking to the docs for explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant