Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/finsberg/category-theory-python

Learning platform for category theory in python
https://github.com/finsberg/category-theory-python

category-theory functional-programming

Last synced: about 2 months ago
JSON representation

Learning platform for category theory in python

Awesome Lists containing this project

README

        

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/finsberg/category-theory-python/main.svg)](https://results.pre-commit.ci/latest/github/finsberg/category-theory-python/main)
[![CI](https://github.com/finsberg/category-theory-python/actions/workflows/main.yml/badge.svg)](https://github.com/finsberg/category-theory-python/actions/workflows/main.yml)
[![github pages](https://github.com/finsberg/category-theory-python/actions/workflows/github-pages.yml/badge.svg)](https://github.com/finsberg/category-theory-python/actions/workflows/github-pages.yml)
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/finsberg/a7290de789564f03eb6b1ee122fce423/raw/category-theory-python-coverage.json)](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/finsberg/a7290de789564f03eb6b1ee122fce423/raw/category-theory-python-coverage.json)

# Category Theory for python programmers

This is my attempt to implement some of the common structures from Category theory in python. Note that I am a beginner in Category theory and will use this repo as way to learn it.

Topics to be covered are

- [x] Monoids
- [ ] Functors (in progress)
- [ ] Applicative Functors (in progress)
- [ ] Monads

This list might be more detailed in the future.

My assessment is manly based on the book called [Category Theory for Programmers](https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/) by Bartosz Milewski and the podcast [LambdaCast](https://soundcloud.com/lambda-cast)

## Typing

I will also use this platform to investigate some of the more advanced features of python's typing system, and will therefore only support the latest version of python.

## Testing

I am definitely not capable of finding good test cases that can really test the corner cases of my implementation. Therefore I will try to use (and learn) property-based testing using [Hypothesis](https://hypothesis.readthedocs.io/en/latest/).

## Contributing
This repo is manly for me to learn about these concepts in Category theory. If anyone finds this useful that is great. If you spot any bugs or mistakes I have made I would be grateful if you could file an issue (or even better : first file an issue and then submit a PR).