# arrow-kt/arrow

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/arrow-kt-arrow).**

6,558 stars · 471 forks · Kotlin · NOASSERTION

## Links

- GitHub: https://github.com/arrow-kt/arrow
- Homepage: http://arrow-kt.io
- awesome-repositories: https://awesome-repositories.com/repository/arrow-kt-arrow.md

## Topics

`arrow` `continuations` `coroutines` `delimited-continuations` `for-comprehension` `fp-types` `functional-data-structure` `functional-programming` `hacktoberfest` `kotlin` `kotlin-dsl` `kotlin-libraries` `kotlin-library` `monads` `optics` `polymorphism` `typeclasses` `typed-lambda-calculus`

## Description

Arrow is a functional programming library for Kotlin that provides tools for implementing data-oriented programming patterns. It serves as a framework for typed error handling, a concurrency toolkit, and a library for the manipulation of immutable data.

The project distinguishes itself through specialized capabilities for managing application failures using explicit types instead of exceptions and implementing resilience patterns such as circuit breakers and retry policies for distributed services. It also provides optics to update and query deeply nested immutable data structures without manual copy operations.

The library covers a broad surface of functional capabilities, including structured concurrency orchestration, software transactional memory for shared state, and resource lifecycle management. It further provides utilities for function composition, error accumulation for validation, and stack-safe recursion.

## Tags

### Data & Databases

- [Immutable Nested Data Manipulation](https://awesome-repositories.com/f/data-databases/immutable-nested-data-manipulation.md) — Provides optics for updating and querying deeply nested immutable data structures without manual copying. ([source](http://arrow-kt.io/learn/summary/))
- [Asynchronous Collection Processing](https://awesome-repositories.com/f/data-databases/asynchronous-collection-processing.md) — Provides functional utilities to make data transformations and collection processing more expressive. ([source](https://arrow-kt.io/))
- [Functional Domain Modeling](https://awesome-repositories.com/f/data-databases/entity-modeling/extensible-domain-entities/domain-driven-entity-frameworks/functional-domain-modeling.md) — Enables the creation of domain models using functional programming and algebraic derivations. ([source](http://arrow-kt.io/))
- [Stack-Safe Recursion](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/general-recursive-functions/stack-safe-recursion.md) — Implements trampolined recursion to ensure stack safety during deep recursive calls. ([source](http://arrow-kt.io/learn/collections-functions/))

### Programming Languages & Runtimes

- [Functional Programming Patterns](https://awesome-repositories.com/f/programming-languages-runtimes/functional-programming-patterns.md) — Implements functional programming paradigms and abstractions specifically for the Kotlin language.
- [Functional Programming Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/functional-programming-libraries.md) — Provides functional programming primitives and abstractions designed for the Kotlin language.
- [Kotlin Concurrency Toolkits](https://awesome-repositories.com/f/programming-languages-runtimes/kotlin-concurrency-toolkits.md) — Provides a comprehensive toolkit for managing parallel computations and shared state in Kotlin.
- [Structured Concurrency](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/synchronization-primitives/channel-based-concurrency/fiber-based-schedulers/structured-concurrency.md) — Provides mechanisms to ensure child computations are automatically terminated when their parent scope completes or fails.
- [Structured Concurrency Managers](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/concurrency-management-libraries/structured-concurrency-managers.md) — Manages task lifecycles and cancellation through hierarchical scopes using structured concurrency patterns. ([source](http://arrow-kt.io/learn/quickstart/))

### Software Engineering & Architecture

- [Monadic Error Handling](https://awesome-repositories.com/f/software-engineering-architecture/error-handling-strategies/monadic-error-handling.md) — Provides a framework for managing failures using typed container types like Either and Option instead of exceptions.
- [Functional Design Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/functional-design-patterns.md) — Provides architectural patterns for building systems using pure functions and isolated logic. ([source](https://arrow-kt.io/))
- [Collection Transformations](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/functional-design-patterns/functional-data-pipelines/collection-transformations.md) — Extends standard collections with functional transformation utilities like map, filter, and reduce. ([source](http://arrow-kt.io/))
- [Circuit Breakers](https://awesome-repositories.com/f/software-engineering-architecture/circuit-breakers.md) — Implements circuit breaker patterns to prevent cascading failures by pausing requests to unhealthy services. ([source](http://arrow-kt.io/learn/quickstart/))
- [Error Accumulators](https://awesome-repositories.com/f/software-engineering-architecture/error-accumulators.md) — Provides mechanisms to collect multiple validation or processing errors instead of failing on the first encounter. ([source](http://arrow-kt.io/learn/summary/))
- [Expected Error Handling](https://awesome-repositories.com/f/software-engineering-architecture/error-handling-strategies/monadic-error-handling/expected-error-handling.md) — Manages anticipated domain failures using typed error channels to ensure predictable recovery. ([source](http://arrow-kt.io/learn/quickstart/))
- [Validation Error Aggregators](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/validation-error-aggregators.md) — Ships utilities that aggregate multiple validation failures into a single structured collection for better feedback. ([source](http://arrow-kt.io/learn/quickstart/))
- [Success and Failure Wrapping](https://awesome-repositories.com/f/software-engineering-architecture/failure-handling-policies/success-and-failure-wrapping.md) — Implements the pattern of wrapping operational outcomes in types that explicitly signal success or failure. ([source](http://arrow-kt.io/learn/summary/))
- [Functional Optics](https://awesome-repositories.com/f/software-engineering-architecture/functional-optics.md) — Implements composable lenses and prisms for querying and transforming deeply nested immutable data structures.
- [Immutable Data Patterns](https://awesome-repositories.com/f/software-engineering-architecture/immutable-data-patterns.md) — Implements architectural patterns that prioritize data integrity through immutable data models. ([source](https://cdn.jsdelivr.net/gh/arrow-kt/arrow@main/README.md))
- [Function Combinators](https://awesome-repositories.com/f/software-engineering-architecture/modular-program-composition/function-combinators.md) — Provides higher-order function combinators to create complex logic through partial application and currying.
- [Parallel Task Execution](https://awesome-repositories.com/f/software-engineering-architecture/parallel-task-execution.md) — Executes multiple asynchronous computations simultaneously and aggregates their results to improve performance. ([source](http://arrow-kt.io/learn/coroutines/))
- [Retry Policies](https://awesome-repositories.com/f/software-engineering-architecture/retry-policies.md) — Provides configurable retry policies with backoff strategies to handle transient failures in external services. ([source](http://arrow-kt.io/learn/quickstart/))
- [Resilience Retry Patterns](https://awesome-repositories.com/f/software-engineering-architecture/retry-strategies/resilience-retry-patterns.md) — Implements circuit breakers, retries, and fallback strategies to prevent cascading failures. ([source](https://cdn.jsdelivr.net/gh/arrow-kt/arrow@main/README.md))
- [Service Overload Protections](https://awesome-repositories.com/f/software-engineering-architecture/service-overload-protections.md) — Ships active resilience patterns like circuit breakers and rate limiting to protect services from overload. ([source](http://arrow-kt.io/learn/resilience/))
- [Error Handling](https://awesome-repositories.com/f/software-engineering-architecture/type-safe-data-handling/error-handling.md) — Defines potential failure types within function signatures to ensure errors are handled at compile time. ([source](http://arrow-kt.io/learn/typed-errors/))
- [Typed Error Management](https://awesome-repositories.com/f/software-engineering-architecture/typed-error-management.md) — Provides a holistic system for catching and transforming errors using type-safe mechanisms.
- [Asynchronous Resource Management](https://awesome-repositories.com/f/software-engineering-architecture/asynchronous-resource-management.md) — Implements patterns for the safe allocation and disposal of asynchronous resources to prevent memory leaks. ([source](https://arrow-kt.io/))
- [Concurrent State Coordination](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-state-coordination.md) — Provides primitives for synchronizing shared mutable state across concurrent execution units. ([source](http://arrow-kt.io/learn/coroutines/))
- [Transactional State Protectors](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-state-coordination/transactional-state-protectors.md) — Protects blocks of execution sharing state across concurrent computations with support for rolling back failed operations. ([source](http://arrow-kt.io/learn/quickstart/))
- [Distributed Transaction Managers](https://awesome-repositories.com/f/software-engineering-architecture/distributed-transaction-managers.md) — Supports modeling complex distributed operations as sagas with automated compensation logic. ([source](http://arrow-kt.io/learn/resilience/))
- [Domain Model Implementations](https://awesome-repositories.com/f/software-engineering-architecture/domain-model-implementations.md) — Provides specialized generic data types to represent domain logic and business rules for increased type safety. ([source](http://arrow-kt.io/learn/design/))
- [Failure Recovery Strategies](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/error-management/error-type-compositions/error-type-transformations/failure-recovery-strategies.md) — Provides capabilities to transform failed computations into successful ones or supply fallback values. ([source](https://arrow-kt.io/learn/typed-errors/))
- [Event Sourcing](https://awesome-repositories.com/f/software-engineering-architecture/event-sourcing.md) — Provides architectural support for modeling domain state as an immutable sequence of events. ([source](http://arrow-kt.io/learn/projects/))
- [Error Accumulating Applicatives](https://awesome-repositories.com/f/software-engineering-architecture/failure-handling-policies/success-to-failure-conversion/either-submersions/either-semigroup-combinations/error-accumulating-applicatives.md) — Implements applicative functors that collect multiple validation errors instead of short-circuiting on the first failure.
- [Immutable State Transactions](https://awesome-repositories.com/f/software-engineering-architecture/immutable-state-transactions.md) — Updates application state using discrete, immutable transactions to ensure consistency and undoability. ([source](https://arrow-kt.io/learn/quickstart/))
- [Resilient Architecture](https://awesome-repositories.com/f/software-engineering-architecture/resilient-architecture.md) — Implements design principles for building robust and fault-tolerant systems using resilience patterns.
- [Resource Acquisition and Release](https://awesome-repositories.com/f/software-engineering-architecture/resource-acquisition-and-release.md) — Ensures asynchronous resources are safely acquired and released in a strict linear sequence regardless of outcome.
- [Resource Lifecycle Management](https://awesome-repositories.com/f/software-engineering-architecture/resource-lifecycle-management.md) — Implements mechanisms to guarantee resource acquisition and release via finalizers and scopes. ([source](http://arrow-kt.io/learn/coroutines/))
- [Resource Lifecycle Managers](https://awesome-repositories.com/f/software-engineering-architecture/rpc-cancellation/asynchronous-operation-cancellation/context-aware-cancellation/resource-lifecycle-managers.md) — Tracks the acquisition and release of external resources across asynchronous boundaries.
- [Compositional Side Effect Management](https://awesome-repositories.com/f/software-engineering-architecture/side-effect-handlers/synchronous-effect-wrapping/side-effect-modeling/compositional-side-effect-management.md) — Implements a composable style for coordinating sequences of behaviors, reducing reliance on dependency injection. ([source](http://arrow-kt.io/learn/design/))
- [Software Transactional Memory](https://awesome-repositories.com/f/software-engineering-architecture/software-transactional-memory.md) — Implements a concurrency control mechanism for executing sets of memory operations as single atomic transactions.

### Development Tools & Productivity

- [Task Racing](https://awesome-repositories.com/f/development-tools-productivity/asynchronous-task-processing/task-racing.md) — Executes multiple asynchronous operations simultaneously and resolves based on the first successful completion. ([source](http://arrow-kt.io/learn/coroutines/))
- [Parallel Action Racing](https://awesome-repositories.com/f/development-tools-productivity/parallel-execution/parallel-action-racing.md) — Executes multiple concurrent operations and returns the result of the first one to complete. ([source](http://arrow-kt.io/learn/summary/))

### DevOps & Infrastructure

- [Monadic Action Retry](https://awesome-repositories.com/f/devops-infrastructure/job-scheduling/automatic-retry-mechanisms/monadic-action-retry.md) — Wraps monadic actions in retry mechanisms to automatically handle intermittent execution failures. ([source](http://arrow-kt.io/learn/summary/))

### Operating Systems & Systems Programming

- [Resilient Async Computations](https://awesome-repositories.com/f/operating-systems-systems-programming/async-concurrency-toolkits/non-failing-async-computations/resilient-async-computations.md) — Repeats failing asynchronous operations according to defined schedules to improve system reliability. ([source](http://arrow-kt.io/learn/resilience/))
