Skip to content

Explain closures much better in the tutorial #13621

Description

@mdinger

Basically, I didn't think the tutorial helped much at all to explain closures so I tried to understand it and make changes so that it is clearer. Guys on IRC helped answer my questions so I think hope what I changed is pretty accurate.

I'll probably try to do more but I wanted to put this up so people could see. I think it's much better. They're all in this commit.

mdinger@b580964

Let me be clear, from reading the tutorial earlier, it wasn't obvious b: |int| had anything to do with a function. I thought it meant an int was gonna be assigned to b. All the vertical bars did was make it special.

Activity

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

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions