Welcome! We notice you're using an outdated browser, which will result in a degraded experience on this site. Please consider a modern, fully supported browser.


The articles are just window-dressing for code snippets I want to keep.

Tagged “monad”

  1. Idris FizzBuzz Part II: Maybes, Infix Notation, and Idris Holes

    Let's conntinue on our journey of writing FizzBuzz in the Idris programming language. If you haven't already, I encourage you to read Part I for an introduction to the problem as well as some basic syntax, and, importantly, information on totality checking.

  2. Idris FizzBuzz Part I: Monads, Comments, and assert_smaller

    My journey of learning the Idris programming language continues! This article will start a tutorial series detailing how to write FizzBuzz in Idris. As before, my goal is to write without the assumption that all Idris learners already know Haskell. We will start by implementing modulo in Idris, and toward that goal we will go painfully slow because frankly this stuff is hard.

  3. Parsing JSON in ReScript Part III: Getting to the Point

    After having established some requirements and some basic utilities, we're ready for the fun part: putting the pieces together. At the end of this post, we will have our working parser.

  4. Parsing JSON in ReScript Part II: Building Blocks

    This is the second in a series of articles on how to build one's own, general-purpose parsing library. After having established a few expectations in the previous post, we are ready to begin building our utilities for our library. Let's start with some highly generalized utilities for functional programming.

  5. Parsing JSON in ReScript Part I: Prerequisites and Requirements

    There are few things more satisfying than a slick, readable, and safe JSON parser. It's one of the joys of functional programming. Using a good JSON parsing pipeline can feel like magic. This series seeks to lift the veil and empower readers (and, importantly, my future self) to build their own customizable and extensible parsing libraries. This article, the first of several, will be a skimmable introduction to the subject as I see it.

  6. Safer Data Parsing with Try Monads

    I have written previously on maybe monads and how to use them with lists to eliminate the possibility of null references in an object-oriented programming language. This standalone post walks through how to use a more generalized kind of monad to prevent all other kinds of unhandled exceptions, using data parsing exceptions as an example.

  7. Error-Free C# Part II: Functional Data Processing

    Mutability bugs and thread-unsafety are big problems in data processing. Fortunately, the .NET Framework has strong support for immutable collections, eliminating entire categories of bugs. This post will show how to use extension methods to create even safer ways to interact with with lists in C# by building on the IMaybe monad type we created in the previous post in this series.

  8. Error-Free C# Part I: The Maybe Monad

    Most people would probably be surprised to find that I consider myself both a professional C# developer and a professional functional programmer. C# is mainly an object-oriented language. The syntax isn't optimized for functional programming. This is entirely true, but just because Microsoft is behind the curve in supporting the new best practices in programming doesn't mean I have to be. This series will walk through how to build and use C# code that is guaranteed to run without any runtime errors.

  9. Dynamic Options and Optional Parameters in ReasonML

    The next type I want to bind from the JavaScript ServiceWorker API is Cache. At first glance, Cache doesn't have any dependencies on any JavaScript interfaces we don't already have access to, but its methods do use dynamic JavaScript options parameters, and the way we deal with this in typed languages is to name and create new specialized types. In this post, I will implement types for these options and the functions that use them.

See all tags.