Skip to content

Commit 632bb8f

Browse files
author
Dmitry Andreevich
committed
Fix code example in README
1 parent 5483d3a commit 632bb8f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,17 @@ Each function has a sample written for it.
3535

3636
All functions produce an `IO (Either Error a)`, where `a` is the actual thing you want. You must call the function using IO goodness, then dispatch on the possible error message. Here's an example from the samples:
3737

38-
import Github.Users.Followers
38+
import qualified Github.Users.Followers as Github
3939
import Data.List (intercalate)
40+
4041
main = do
41-
possibleUsers <- usersFollowing "mike-burns"
42-
putStrLn $ either (\error -> "Error: " ++ $ show error)
43-
(intercalate "\n" . map githubUserLogin)
42+
possibleUsers <- Github.usersFollowing "mike-burns"
43+
putStrLn $ either (("Error: "++) . show)
44+
(intercalate "\n" . map formatUser)
4445
possibleUsers
4546

47+
formatUser = Github.githubOwnerLogin
48+
4649
Contributions
4750
=============
4851

0 commit comments

Comments
 (0)