Skip to content

Commit

Permalink
optics: fix haskell snippet being in wrong exercise body
Browse files Browse the repository at this point in the history
  • Loading branch information
GoNZooo committed Aug 20, 2022
1 parent b3d238c commit 5f99eb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basics/extras/optics.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,10 +455,6 @@ exception, and we use `_NoSuchThing :: Prism' IOErrorType ()` to determine wheth

3. Create prisms for the `RelationshipStatus` structure from chapter 1:

4. Create a function using lenses and prisms that takes a `UserProfile` and returns a
`Maybe UserProfile` where it effectively answers the question whether a user is married to
someone who has a userprofile on our page.

```haskell
import Data.Time (Day)
import Prelude
Expand All @@ -483,6 +479,10 @@ data UserProfile = UserProfile
deriving (Eq, Show)
```

4. Create a function using lenses and prisms that takes a `UserProfile` and returns a
`Maybe UserProfile` where it effectively answers the question whether a user is married to
someone who has a userprofile on our page.

## Traversals and Folds

Traversals allow us to modify multiple values in a structure at once, given some pattern that
Expand Down

0 comments on commit 5f99eb4

Please sign in to comment.