If you HAD to work on a project that primarily used object-oriented design, what functional programming patterns (if any) would you keep in your tool box?

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

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

    Λrrow - Functional companion to Kotlin's Standard Library (by arrow-kt)

  • Kotlin’s really nice, and even better with http://arrow-kt.io

  • Immer

    Create the next immutable state by mutating the current one

  • I don't have anything particular in mind, but from what I remember, as I already said, almost every reduce that reconstructs objects. The most simple is something like this, but it's bloodier in practice: const newObj = kvps.reduce(obj, [k, v] => f(v) ? ({ ...obj, [k]: v }) : obj) vs const newObj = { ...obj }; for (const [k, v] of kvps) { if (f(v)) { newObj[k] = v; } } Also check this award winning javascript library that is basically a mutable syntax sugar to work with immutable data. It turned out so much useful that it's already built-in in redux-toolkit, which is a recommended way to use redux (a state management library often used with react).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
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