Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Suggestions for the "basics" module (for "beginners and people in a hurry") #1

Open
mrkgnao opened this issue Mar 19, 2018 · 3 comments

Comments

@mrkgnao
Copy link
Collaborator

mrkgnao commented Mar 19, 2018

No description provided.

@chris-martin
Copy link

I think the Lens type needs to be introduced prior to the lens function, or else I have no idea what I'm reading: What is a lens, and thus why would I want to use this function to make one?

And, perhaps more ambitiously, to answer this question: If a lens is a getter and a setter, then why doesn't it just look like this?

data Lens s t a b =
  Lens
    { lensGet :: s -> a
    , lensSet :: s -> b -> t
    }

@mrkgnao mrkgnao changed the title Suggestions for the "beginner's" / "essentials" module Suggestions for the "basics" module (for "beginners and people in a hurry") Mar 19, 2018
@chris-martin
Copy link

Perhaps there could be a section on "composing optics"? I'm not sure how much of that is simply "use (.)" or if there are other relevant combinators you need?

@mrkgnao
Copy link
Collaborator Author

mrkgnao commented Mar 19, 2018

When composing two dissimilar optics, you get the join of the two optic types, which needs explaining.

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

No branches or pull requests

2 participants