Skip to content

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

Description

@milesfrain

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

Activity

  1. changed the title [-]Improve content on curried functions and partial application[/-] [+]Ch3 - Improve content on curried functions and partial application[/+] on Jan 2, 2021
  2. milesfrain commented on Jan 3, 2021

    @milesfrain
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions