Skip to content

Commit 0ce240b

Browse files
kikapaf31
authored andcommitted
typo: Replaced return with pure (documentationjs#82)
1 parent 2fb18e9 commit 0ce240b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guides/Generic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ instance decodePerson :: Decode Person where
7878
decode value = do
7979
name <- value ! "name"
8080
location <- value ! "location"
81-
return $ Person { name, location }
81+
pure $ Person { name, location }
8282
```
8383

8484
This is not too bad, but real-world records often contain many more fields. Also, it would be nice if we could be sure that the corresponding _encoding_ function would always generate compatible data. Let's see how to verify the same data using `Generic`, which will solve both of these problems.

0 commit comments

Comments
 (0)