do-notation for monads used in examples before it is introduced

Open Beginner friendly
#316 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Domain
documentation

Research direction

Read section 4.2.2, “The Identity Monad,” in the book source and locate the two mapM examples that use do notation. Check how the examples can be presented before section 4.4 introduces that notation. Done when both examples are understandable without relying on notation not yet introduced.

Written by the indexing model from the issue text.

Description

In section 4.2.2 The Identity Monad, two examples are using the do-notation :

def numbers := mapM (m := Id) (do return · + 1) [1, 2, 3, 4, 5]

def numbers := mapM (do return · + 1) [1, 2, 3, 4, 5]

but that notation is only introduced later in the book (namely in 4.4. do-Notation for Monads), which makes those examples unhelpful and confusing.

Dominant language
Lean
Stars
211
Forks
83
Avg merge
8m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from leanprover/fp-lean

All issues in leanprover/fp-lean

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.