Skip to content
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

Fix optics tutorial sample code #95

Merged
merged 1 commit into from
Mar 11, 2022
Merged

Conversation

Clindbergh
Copy link
Contributor

I believe this line was missing in the sample code. Otherwise the sample code

person1 = Person "Mark" address1 Nothing []
person2 = Person "Jane" address2 (Just address3) [person1]
person3 = Person "Zack" address3 Nothing []

and

print $ person1 ^. homeAddress . doorNumber

would not work.

@fjvallarino
Copy link
Owner

@Clindbergh indeed, that line is missing. It seems I updated the code in the example and did not update the tutorial to reflect that change.

I also notice now that _address should be _workAddress.

@fjvallarino fjvallarino merged commit 34fa637 into fjvallarino:main Mar 11, 2022
@Clindbergh
Copy link
Contributor Author

Ah, I have not been this far in the tutorial yet :). I will create another PR for it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants