Implementing Boolean algebra in Sanctuary with nullary types

In a couple of previous posts, I’ve used “nullary types”, and sort of hand-waved away any explanation of what that actually means. When we’re dealing with types, some are simply a set of concrete values. Consider the classical Int, Bool, or Char; you have all the information you need to use those types just based […]

Defining Custom Types in Sanctuary

Sanctuary is a functional programming library for JavaScript that provides typechecking and compatibility with the Fantasy Land spec. If all that is a bit unfamiliar to you, never fear! Sanctuary’s docs provide a less esoteric way of describing the library: Sanctuary promotes programs composed of simple, pure functions. Such programs are easier to comprehend, test, […]