At the beginning of the week, we begun by setting up Haskell and starting out with some basics. Today, we’ll continue to expand on that explore some more of the basics of Haskell.
Of course, this isn’t your first time learning a new language, so (hopefully!) you are already proceeding by looking for mappings from language constructs and patterns that you already know from other languages into, e.g.,
- Function signatures and declarations,
- Variables, and
- Function calls,
Into their Haskell equivalents, if they exist! This is a natural way to learn a new programming language, and you should continue to be mindful of how effective this process is for yourself, both as a point of personal growth but also in terms of usability.
Continue to skim through Learn You a Haskell for Great Good! to learn the basics of Haskell. Provided that you have a working development environment, you can skim through chapters 3 through 8 to get a sense of how to write recursive functions à la Racket. Again, given your knowledge of programming, especially functional programming from 151, you should find these chapters to be review.
In addition to LYH, try this resource as well which gives a fly-by introduction to the language:
Try to get to the point by the end of your exploration where you feel comfortable a CSC 151-style recursive function over lists, e.g., the
append function without needing to do too much lookup of syntax. Come to class with:
Any language or setup questions that you might have lingering at this point regarding Haskell.
Some reflective thoughts on how the learning process has gone so far. Come up with 1–2 sentence answers to the following questions:
- Has LYH been a good resource? Why or why not?
- Does “Learn X in Y Minutes” seem like a better resource? Why or why not?
- Have you found anything favorable, disfavorable, or surprising about using Haskell so far?