# typelift/Swiftz

Functional programming in Swift

Repository: https://github.com/typelift/Swiftz
Canonical: https://ross.abutalabs.com/products/swiftz
Language: Swift
License: BSD-3-Clause
License Family: permissive
Topics: swift, functional-programming
Last push: 2022-06-30T07:38:54+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4475, "days_push": 1525, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3318, forks 229 (observed 2026-08-28T04:07:56.183685+00:00)

## What it is
Swiftz is a Swift library for functional programming that provides functional data structures, typeclasses, and idioms like Lists, Arrows, Semigroups, and Monoids. It is a superset of Swiftx, inspired by Scalaz and Haskell's base library, enabling declarative programming styles in Swift.

## Use cases
- use functional data structures and typeclasses in Swift
- write declarative functional code on iOS or macOS
- use monoids and semigroups for composable reductions
- work with immutable lists, arrows, and heterogeneous lists in Swift
- bring Haskell-style abstractions to a Swift codebase

## When to choose
- you want a comprehensive functional programming toolkit in Swift
- you need typeclass-style abstractions with strong type-system support
- you prefer Scalaz/Haskell-inspired semantics in your Swift projects

## When to avoid
- you only need a few simple functional primitives (use Swiftx instead)
- you need a library with frequent updates and modern Swift concurrency support
- your team is unfamiliar with functional programming concepts

## Facets
- artifact type: library
- maturity: maintenance
- function: programming-language, type-system
- domain: programming-languages, developer-tools
- platform: -
- tags: functional-programming, monads, typeclasses, swift, scalaz-inspired, algorithms, macos, ios, linux

## Member repositories
- typelift/Swiftz (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:56.183685+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:42:03.767153+00:00, confidence not recorded.
  - readme: https://github.com/typelift/Swiftz (fetched 2026-08-28T04:07:56.183685+00:00, sha 683b0c7da2b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
