alexandradeas / funpy

Functional Data Structures in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A library of functional data structures for Python

Introduction

This is largely a repo for me to better understand Python in the real world: such as package management, imports, the call stack, metaprogramming techniques, testing, and how the interpreter works.

The intention is to experiment with functional programming within Python by following some key philosophies:

  • Avoid mutability wherever possible
  • Strong encapsulation of data types
  • Self-referential data structures
  • Strong type safety where possible

These are not necessarily Pythonic ways of programming and so this shouldn't be taken as an example of how to program in Python, but instead is a way for me to better understand Python by pushing against the trend of what Python supports

Features

These features will all be updated with stronger type safety when Python 3.12 is stable by introducing type parameters via pyright

Name Status
Maybe Type ✔️
Either Type
Node ✔️
Stack ✔️
Queue
Deque
LinkedList
HashMap
Binary Tree
Graph
Heap
Functional Utils

About

Functional Data Structures in Python


Languages

Language:Python 100.0%