March 2018
Beginner
616 pages
16h 53m
English
After reading lesson 32, you’ll be able to
At the end of the preceding lesson, you saw that List is an instance of Monad. You saw only a simple example of using List as a Monad to process a list of candidates.
assessCandidateList :: [Candidate] -> [String]
assessCandidateList candidates = do
candidate <- candidates 1
let passed = viable candidate 2
let statement = if passed 3
then "passed"
else "failed"
return statement 4