Decision, decision

Computers are excellent decision makers. Give them a program, some input data, and they churn out some other data. Garbage in, garbage out. In this chapter, you will learn various Haskell constructs to help your program make decisions depending on the situation at hand. The section I can’t decide discusses how to write a program that branches into several paths. Knowing how to write branches in your program would help you to write functions of various complexity, the topic of the section Simple functions. The rest of the chapter is devoted to various techniques to help you write functions that use pattern matching.