Skip to content
1 min read

Functors

Note to self

A Functor is a design pattern that evolves from category theory in mathematics. Fundamentally it’s a mapping between categories that preserves the structure of the original categories involved. It satisfies two laws: -

  1. Identity law: F(idA)=idF(A)\small{F(\operatorname{id}_A) = \operatorname{id}_{F(A)}}
  2. Composition law: F(gf)=F(g)F(f)\small{F(g \circ f) = F(g) \circ F(f)}

Reading list

Thanks for reading.

Say hi on LinkedIn (opens in new tab)

More writings

  1. 2026 4

    1. So Much for O(1)
    2. We Might All Be AI Engineers Now
    3. The Hardest Bug I Ever Fixed Wasn't in Code
    4. Why I Switched to Podman (and Why You Might Too)
  2. 2024 3

    1. The World is Stochastic
    2. Debugging a running Java app in Docker
    3. Why is it UTC and not CUT?
  3. 2023 12

    1. Deep prop drilling in ReactJS
    2. Eigenvectors
    3. Java's fork/join framework
    4. TypeScript's omit and pick
    5. JavaScript's new immutable array methods
    6. Integrating JUnit 5 in Maven projects
    7. My take on ChatGPT and prompt engineering
    8. Declarative events in ReactJS
    9. Positive Lookaheads
    10. Functors
    11. Fast forward videos with ffmpeg
    12. Rotate y-axis of a 2D vector
  4. 2022 9

    1. Synchronizing time
    2. Vector rotation
    3. Sed find and replace
    4. Asgardeo try it application
    5. Flatten error constraints
    6. Good Git commit messages
    7. Asgardeo JIT user provisioning
    8. Monotonic Arrays
    9. How GOROOT and GOPATH works
  5. 2021 1

    1. Two summation