johnbender.us

recent / categories / archives

Posts from September 2009

Algebra of Programming: Chapter 1 section 5

Inverses are (horrible)-1 This section gives an introduction to the extremely interesting concept of implementing a function as the inverse of another with zip and unzip as the examples. First, the goal is to build out our zip and unzip functions to satisfy the equation zip . unzip = id A couple of notes here. [...]


Algebra of Programming: Chapter 1 Section 3

Lists The third section of chapter one covered some basic functional programming concepts. Namely Cons lists, their mirror Snoc lists, and the functions built to operate on them. Particularly the adaptations of the foldn function from the previous section which operated over Nat. data Listl a = Nil | Snoc (Listl a, a) deriving Show [...]


Algebra of Programming: Chapter 1 Section 2

[update] you’ll notice I corrected the title to represent the section I went through. Not clear how I got the idea this was the whole first chapter. My wife, bless her heart, heard me talking about Algebra of Programming after it was recommended to my by the fine people in #haskell and she went out [...]