﻿ David Raab · Blogging about programming

# Continuations and foldBack

In From mutable loops to immutable folds we implemented foldBack through rev and fold. In this post I show you how you can implement foldBack by using a continuation function. Functions Before we see how to implement foldBack, I want to give you analogy first. This analogy helped me in...

# Sequence and Traverse

One problem that appears from time to time is that we we have some kind of collection (I use list here) and we want to map every element with a monadic function 'a -> M<'b>. This then returns a list<M<'a>>. But often we want a M<list<'a>>. To be more concrete....

# Applicative: Lists

In Understanding apply I primarily used the Option type to show how you implement and use an Applicative Functor. But the concept also works for any other type. This time I want to show you the idea of an Applicative with a list, what it means, what you can do...

# Optionals

In this post I want to talk about Optionals more deeply. I already wrote about null, but I noticed that it is still not immediately clear on why Optionals are better. Instead of focusing why null is bad, this time I want to focus why Optionals are good. For this...

# From mutable loops to immutable folds

When we ask of key-features of functional programming, you will probably hear two things most often. Immutability and recursion. But why is that so? As Immutability also becomes more important in OO languages you will probably find a lot of reason for that one, but why are recursive functions so...

# Understanding bind

In Understanding map we learned that implementing a map function is what we call a Functor. In Understanding apply we extended that idea with the return and apply function and we call the result an Applicative Functor. The next important function in our toolset is the bind function. Monads The...

# Understanding apply

In my previous blog "Understanding map" I introduced the map function and described that implementing map and fulfilling two laws we get what we call a Functor. In this Post we discuss the apply function that we can view as an extension to the map function. Problem with map It...

# Understanding map

One important function in functional programming is the map function. When I learned F# I must admit that I had some problems first, understanding it. The problem was, I already knew the map function from dozens of other languages. Or to say it correctly, I mostly learned a wrong explanation...