Welcome to a new technical series on Channel 9 folded into a different kind of 9 format: C9 Lectures. These are what you think they are, lectures. They are not conversational in nature (like most of what you're used to on 9), but rather these pieces are entirely focused on education,…
In Chapter 2, Dr. Meijer introduces Haskell syntax and notation (via a Haskell implementation called Hugs, to be precise, which is based on Haskell 98) and we learn about the Haskell syntax that represents the fundamental construct of functional programming:functions. It's not like you're used…
In Chapter 3, Dr. Meijer explores types and classes in Haskell. A type is a collection of related values and in Haskell every well-formed expression has a type. Using type inference, these types are automatically calculated at run time. Ifexpression e returns a type t, then e is of type t, e :: t. A…
In Chapter 8, Functional Parsers, it's all about parsing and parsers. A parser is a program that analyses a piece of text to determine its syntactic structure. In a functional language such as Haskell, parsers can naturallybe viewed as functions. type Parser = String -> TreeA parser is…
Well, my friends, the day has arrived. For thirteen weeks, you have been provided all the conceptual tools to take the leap into the deep end of the functional programming pool and float safely. The great Dr. Erik Meijer has generously given his value time to teach us the fundamentals as delivered…
In Chapter 5, Dr. Meijer introduces and digs into List Comprehensions. In mathematics, comprehension notation is used to construct new sets from old sets. In Haskell, you can create new lists from old lists using a similarcomprehension syntax:[x^2 | x <- [1..5]]The above notation represents the…
In Chapter 7, Dr. Meijer teaches us about Higher-Order Functions. A function is called higher-order if it takes a function as an argument and returns a function as a result:twice :: (a -> a) -> a -> atwice f x = f (f x)The function twice above is higher…
Ever wonder what would happen if you happened upon Simon Peyton-Jones, author of the Glasgow Haskell Compiler (GHC) and a key contributor to the Haskell functional programming language, and John Hughes, fellow Haskellite, computer scientist, creator of QuickCheck, and author of…
"The Expression Problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type
safety (e.g., no casts)." - Philip…
In Chapter 9, Interactive Programs, Dr. Meijer will teach us how to make programs in Haskell that are side-effecting:interactive. Haskell programs are pure mathematical functions with no side effects. That said, you want to be able to write Haskell programs that can read input from the keyboard and…