8000 Chapter 3: CustomerLenses · Issue #43 · debasishg/frdomain · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Chapter 3: CustomerLenses #43

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

Open
vishallama opened this issue Feb 11, 2018 · 1 comment
Open

Chapter 3: CustomerLenses #43

vishallama opened this issue Feb 11, 2018 · 1 comment

Comments

@vishallama
Copy link

protected val nameLens = Lens[Customer, Int](

Given the implicit context (which is my own guess), it seems like the code for nameLens should probably be as follows:

protected val nameLens = Lens[Customer, String](
    get = _.name,
    set = (o, v) => o.copy(name = v)
)
@ghost
Copy link
ghost commented Jun 17, 2018

Or the nameLens should be named idLens :-)

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

No branches or pull requests

1 participant
0