Skip to content

Instantly share code, notes, and snippets.

View JPHutchins's full-sized avatar

JP Hutchins JPHutchins

View GitHub Profile
@lukechampine
lukechampine / monads.c
Last active November 10, 2025 23:26
Maybe and Either Monads in C
#include <stdio.h>
#include <stdbool.h>
// Maybe
typedef struct MaybeInt {
int just;
bool nothing;
} MaybeInt;