Posts tagged "haskell"

Haskell's Maybe and Either types

In which we have an introductory glance at the Maybe and Either types in Haskell. An unusual entry in the series of reading Haskell Programming from First Principles, but an entry nonetheless.

Let's read: Haskell Programming from First Principles, pt XI

In which we read the 11th chapter of 'Haskell Programming from First Principles': Algebraic Data Types and discuss higher-kinded types, cardinality in relation to the type system, and how the function type is exponential. Pokémon make an appearance too!

Corecursion and anamorphisms

In which we explore the concepts of corecursion and anamorphisms. We look at what corecursion and anamorphisms are, relate them back to recursion and catamorphisms, and then have some fun with exploring different ways unfold numbers into different representations.

Let's read: Haskell Programming from First Principles, pt X

In which we go deep on folding lists and uncover surprisingly large and important differences between folding right and folding left. We discuss laziness, infinite lists, and catamorphisms.

Let's read: Haskell Programming from First Principles, pt IX

In which we take a deep dive into the world of lists by looking at list creation, list comprehension, and about spines and non-strict evaluation. As it turns out, this has some pretty interesting implications.

Let's read: Haskell Programming from First Principles, pt VIII

In which we talk about recursion and play with bottoms. We look at defining functions in terms of themselves, applying a function an arbitrary number of times, and what base cases are.

Let's read: Haskell Programming from First Principles, pt VIIc

In which we talk about function composition and pointfree style and cover the chapter definitions for chapter 7. Function composition is especially important and a cornerstone of Haskell programming, so make sure not to miss this one!

Let's read: Haskell Programming from First Principles, pt VIIb

In which we look at higher order functions and guards. We look at what the definition of a higher order function is and look at some examples. We also look at guards; what they are, the syntax, and the importance of ordering.

Let's read: Haskell Programming from First Principles, pt VIIa

In which we start looking at the 'More Functional Patterns' chapter of 'Programming Haskell From First Principles'. This time, we're looking at pattern matching and case expressions; what they are and how to use them.

Let's read: Haskell Programming from First Principles, pt VI

In which we finally have a closer look at typeclasses and take some time to explore some of the most basic ones, how they work, and how we can use them.

Let's read: Haskell Programming from First Principles, pt V

In which we look at type constraints and how they relate to typeclasses, currying and partial application, and polymorphism, both parametric and ad-hoc and how we use it in Haskell.

Let's read: Haskell Programming from First Principles, pt IV

In which we take a look at some basic data types in Haskell, such as numeric types, tuples, and lists. We also look at data declarations, type and data constructors, and if-expressions. This one's quite the mouthful, so grab some supplies and come explore!

Let's read: Haskell Programming from First Principles, pt III

In which we learn about how strings are represented in Haskell, start exploring how we work with lists, look at a surprise operator and talk briefly about total vs partial functions.

Let's read: Haskell Programming from First Principles, pt II

In which we look at basic Haskell syntax, are pleasantly surprised at compiler type inference, and learn about operators and variable assignment. We also look at some scary terms like 'weak head normal form'.

Let's read: Haskell Programming from First Principles, pt I

In which I finally find the time to dive into learning Haskell from first principles. Turns out 'first principles' mean understanding the mathematical underpinnings of the language before I ever get to touch (or even see) any code.