# luafun/luafun

Lua Fun is a high-performance functional programming library for Lua designed with LuaJIT's trace compiler in mind.

Repository: https://github.com/luafun/luafun
Canonical: https://ross.abutalabs.com/products/luafun
Homepage: https://luafun.github.io/
Language: Lua
License: NOASSERTION
License Family: other
Topics: lua, luajit, functional-programming, luarocks
Last push: 2025-04-15T14:55:30+00:00

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

## Adoption (not part of the score)
Stars 2261, forks 112 (observed 2026-08-28T04:06:31.780348+00:00)

## What it is
Lua Fun is a high-performance functional programming library for Lua and LuaJIT, providing over 50 primitives like map, filter, reduce, and zip. It is designed to leverage LuaJIT's trace compiler so functional compositions compile into efficient machine code.

## Use cases
- write functional-style map/filter/reduce pipelines in Lua
- process sequences lazily with generators and iterators
- get near-C performance for nested functional expressions on LuaJIT
- replace verbose imperative loops with composable higher-order functions
- use functional programming primitives from Haskell/ML/Python in Lua

## When to choose
- you use LuaJIT and want functional code that JIT-compiles into tight machine loops
- you need a rich set of iterator and sequence primitives in Lua
- you want a small, documented, unit-tested library installable via luarocks

## When to avoid
- you need a guaranteed-stable API for production (master branch may change)
- you use Lua versions beyond 5.3 or need features outside its supported runtimes
- you need object-oriented or data-structure libraries rather than sequence operations

## Facets
- artifact type: library
- maturity: active
- function: concurrency, developer-tools
- domain: programming-languages, developer-tools
- platform: lua, cross-platform
- tags: functional-programming, luajit, iterators, lazy-evaluation, higher-order-functions, algorithms

## Member repositories
- luafun/luafun (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:31.780348+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-30T02:42:33.535814+00:00, confidence not recorded.
  - readme: https://github.com/luafun/luafun (fetched 2026-08-28T04:06:31.780348+00:00, sha 9c84722386b2)
  - homepage: https://luafun.github.io/ (fetched 2026-08-29T10:23:08.071852+00:00, sha 4081b8c1175f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
