jreina / categories

Some categories I guess

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Categories

Typewise implementations of categories from category theory implemented in TypeScript

Why?

The contravariant functor category was insanely confusing to me when I first encountered it, so I set out to try to make sense of it by building an object with such properties.

Why TypeScript?

None of this really makes sense without types. Since all of these categories are already implemented as typeclasses in Haskell, it was pretty much a toss up between TypeScript and C#. Since I wanted these structures to be relatively loose, TypeScript it is.

What's implemented?

  • Bifunctor
    • Either
  • Contravariant Functor
    • Orderable
  • Functor
  • Monad

How closely do these resemble the actual categories?

I truly don't know. Though I've read a lot on the subject, I'm still sort of a wannabe category theorist so I could be completely wrong on these. If so, create an issue or submit a PR.

License

MIT

About

Some categories I guess

License:MIT License


Languages

Language:TypeScript 100.0%