William Lewis

William Lewis @wjlewis

About: A man, a plan, a lambda.

Joined:
Jul 23, 2021

William Lewis
articles - 7 total

Pretty-Printing is Compilation

Wadler's A Prettier Printer is a classic functional pearl. Someday I hope to understand it. Whether...

Learn More 0 0Oct 31 '24

Sum Types in Python

Python is a lovely language. However, when working in Python I frequently find myself missing...

Learn More 0 0Oct 18 '24

Arithmetic with Uncertainty

If you know the temperature in Fahrenheit, then it's easy enough to convert it to Celsius: def...

Learn More 0 0Sep 15 '24

Introduction

We tend to think of random phenomena as the purview of probability — situations in which an element...

Learn More 0 0Sep 13 '24

Disjoint Unions in C

It's not immediately clear how to express this Haskell type in C: data Tree = Leaf Int | Inner...

Learn More 1 1Sep 10 '24

Levenshtein Distance

How many moves does it take to transform the word "alpha" into "aleph", where a move is one of the...

Learn More 1 0Aug 30 '24

Priority Queues using Binary Heaps

Priority Queues using Binary Heaps Suppose you want to write a task scheduler with the...

Learn More 2 0Sep 1 '21