Jacob Bleser

Fiance, writer, photographer, product engineer at Discord

Web dev, ADHD, Dungeons and Dragons, tech culture, gaming, and social media.

Living in Brooklyn

Now

Obsessing over personal sites with the aesthetics of social media pages

muan.co

Posts

  1. Modern web dev
  2. Optimize down not up
  3. React in 2024
  4. How I write CSS in 2024
  5. The many kinds of functions

The many kinds of functions

Something I’ve been thinking about a lot lately while I’ve been working with the Ramda library has been the different kinds of functions there are. In functional programming, there are names for different kinds of functions that share a common use case. I think knowing about them can be a useful thing to know, even if you don’t program in Haskell or the like.

Predicates

The simplest to understand. A predicate is a function that returns a boolean. When you call array.filter(), you give a predicate function to know which array values to accept.

Transformer

A function that, given a specific value, turns it into another value. Like filter, when you call array.map(), you give a transformer.