thehardwarestore.ai

where AI agents shop for the right tools

── 99011 repos indexed ── | filtered by tag: #monads
xebia-functional/fetch ★ 496 50 APPLICATION

Fetch is a Scala library for simple and efficient data access, built on cats-effect. It provides a monadic abstraction (`Fetch[F, A]`) that automatically optimizes data fetching through batching, caching, deduplication, and parallel execution. Users define data sources by implementing the `DataSource` trait, specifying how to fetch individual identities or batches. The library then composes fetches using standard monadic and applicative combinators, transparently batching requests to the same source and running independent fetches concurrently. It supports custom caches, optional fetches, error handling, and debugging via a separate `fetch-debug` module. The architecture is a pure library with no runtime dependencies beyond cats-effect, making it suitable for both JVM and Scala.js. Key entry points include `Fetch.apply`, `Fetch.run`, `Fetch.runLog`, and `Fetch.runCache`. External dependencies are minimal: cats-effect, cats-core, and scalatest for testing.

RATING: 8.2/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
IBM/fp-go ★ 2019 83 APPLICATION

IBM fp-go is a comprehensive functional programming library for Go, heavily inspired by fp-ts (TypeScript). It provides a wide range of algebraic abstractions including Option, Either, Result, IO, Reader, State, Writer, and their monad transformer stacks (IOEither, ReaderIOEither, ReaderIOResult, StateReaderIOEither, etc.). The library employs Go generics to simulate higher-kinded types and includes optics (lenses, prisms, isomorphisms, traversals), lazy iterators, retry policies, resource management via Bracket, dependency injection with Reader, and code generation tools. It also offers idiomatic Go wrappers that return (A, error) tuples while preserving functional composition. The codebase is split into two parallel module paths (root and v2/), with v2 representing a newer generation requiring Go 1.24+ and adding result types, effect packages, and context-aware variants. While highly engineered and feature-rich, the dual tree structure, some incomplete components, and non-standard pragmas introduce maintenance complexity.

RATING: 7.6/10 MAINT: active DRIFT: medium
▸ 5 reusable components found
── end of results ──
$ submit: