good examples of functional-like python code that one can study?

This page summarizes the projects mentioned and recommended in the original post on /r/functionalprogramming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • jax

    Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more

  • thinc - defining neural nets in functional way jax, a new deep learning framework puts emphasis on functions rather than tensors, I've tested it for a couple of applications and it's really cool, you can write stuff like you'd write math expressions in papers using numpy. That speeds up development significantly, and makes code much more readable

  • Coconut

    Simple, elegant, Pythonic functional programming.

  • If you want to do FP style programming in Python you technically can, but it's been made to make the whole thing less pleasant and the language and community continues to reflect that. It would make more sense to try using something like Coconut, which is to Python what Scala is to Java: essentially a superset of the language that works in the same ecosystem. Or use an entirely different language like F# or OCaml, but that's a bigger jump than going from Python to Coconut.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • thinc

    🔮 A refreshing functional take on deep learning, compatible with your favorite libraries

  • thinc - defining neural nets in functional way jax, a new deep learning framework puts emphasis on functions rather than tensors, I've tested it for a couple of applications and it's really cool, you can write stuff like you'd write math expressions in papers using numpy. That speeds up development significantly, and makes code much more readable

  • pfun

    Functional, composable, asynchronous, type-safe Python.

  • Another examples: pfun - stuff you'd find in FP language, but in Python (like using monads for effects)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts