nowfound

Life & fun · December 11, 2024

Lfi – a lazy functional sync, async, and concurrent iteration library

Hey HN! Roughly 4 years ago I started building a lazy functional iteration library for JS/TS. I had a few goals for the library: - Supporting sync, sequential async, and concurrent async iteration - Limiting it to a small number of orthogonal concepts that compose beautifully to solve problems - Making it fully tree-shakeable I built it for myself and have (mostly) been its only user as I refined it. I've used it in lots of personal projects and really enjoyed it. I recently decided it would be nice to spread that enjoyment so I created a documentation website complete with a playground…

Lfi – a lazy functional sync, async, and concurrent iteration library launched on December 11, 2024 with 98 votes, #401 of 5,365 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 1 year on.

Visit lfi.dev ↗Alternativestop 7% of December 2024

In plain words

Lfi is a JavaScript and TypeScript library for lazy functional iteration that handles synchronous, sequential asynchronous, and concurrent asynchronous operations. It emphasizes composable, orthogonal concepts designed to solve iteration problems while maintaining full tree-shakeability for efficient bundling. The library is intended for developers working on personal or professional projects who prefer functional approaches to iteration patterns. It includes documentation and an interactive playground for exploring its capabilities.

written from the facts on this page · September 2026

From the sources

A lazy functional sync, async, and concurrent iteration library for JavaScript and TypeScript

lfi ’s concurrent iterables offer superior performance over p-map , p-filter , and others, because each item flows through the operations independently of other items. import { asConcur , filterConcur , mapConcur , pipe , reduceConcur , toArray } from 'lfi' import pFilter from 'p-filter' import pMap from 'p-map' // Hypothetical delays for each item const mapDelays = [ 5 , 1 , 1 ] const filterDelays = [ 1 , 1 , 5 ] const delay = ms => new Promise ( resolve => setTimeout ( resolve , ms ) ) const mapFn = i => delay ( mapDelays [ i ] * 1000 ) . then ( ( ) => i ) const filterFn = i => delay ( filterDelays [ i ] * 1000 ) . then ( ( ) => true ) // Takes 6 seconds! Each item flows through the //…from lfi.dev

In the maker’s words, at launch

Hey HN! Roughly 4 years ago I started building a lazy functional iteration library for JS/TS. I had a few goals for the library: - Supporting sync, sequential async, and concurrent async iteration - Limiting it to a small number of orthogonal concepts that compose beautifully to solve problems - Making it fully…

Does a similar job

all alternatives →
  • Whirlwind – Async concurrent hashmap for Rust2024 · github.com · ▲140

    Hey HN, this is Will and David from Fortress (https://news.ycombinator.com/item?id=41426998). We use a lot of async Rust internally, and created this library out of a need for an async-aware concurrent hashmap since there weren’t many available in the Rust ecosystem. Whirlwind is a sharded HashMap with a fully asynchronous API. Just as dashmap is a replacement for std::sync::RwLock, whirlwind aims to be a replacement for tokio::sync::RwLock. It has a similar design and performance characteristics to dashmap, but seems to perform better in read-heavy workloads with tokio's…

  • Lisp with copying GC in 537 lines of C (plus Lisp 1.5 on top)2018 · github.com · ▲152

    Moved to Forgejo! Contribute to krig/LISP development by creating an account on GitHub.

  • A Common Lisp implementation in development, supports ASDF2025 · savannah.nongnu.org · ▲96

    Implementation of the standard is still not complete, but breakpoints and stepping work quite well! It also has some support for watchpoints, that no implementation has. Now it ships with ASDF and is capable of loading systems! Let me know if you like it. Support on Patreon or Liberapay is much appreciated

  • DataMorf2023 · datamorf.io · ▲97

    Simplify real-time data manipulation and integration

  • Crudlet.js – A common, streamable interface for synchronizing data2015 · github.com · ▲94

    utility library for async iterable iterators. Contribute to crcn/mesh.js development by creating an account on GitHub.

  • Ts-Chan – Go-Like Concurrency Primitives for TypeScript/JavaScript2023 · github.com · ▲60

    Hey HN, I’m sharing ts-chan, an NPM package providing Go-like concurrency primitives, including channels and select statements, for TypeScript and JavaScript, supporting Node.js, Deno, Bun, and browsers. This is something I've built to make implementing Go-style "control loops" feasible in JavaScript, but there are many possible applications. Highlights: - Features a FIFO processing Chan class and versatile Select class for concurrency control. - Supports buffered channel and channel close semantics very close to Go's. - TypeScript-first implementation. - Defines a simple "channel protocol"…

More life & fun this month

the category →

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, December 2024

the whole month →
  • Remy AI▲2,170

    Anyone can sleep and recover better

    AI · 2024 · apps.apple.com

  • Remento▲1,681

    The AI biographer for loved ones

    AI · 2024 · remento.co

  • Aimfox▲1,213

    Built for LinkedIn outreach, made to close deals

    Growth · 2024 · aimfox.com

  • Stackfix▲1,112

    Compare software in seconds

    AI · 2024 · stackfix.com

  • Coval▲1,012

    Simulation & evals to ship delightful voice & chat AI agents

    AI · 2024 · coval.ai

  • VocAdapt▲961

    Master languages with AI-adapted authentic content

    Life & fun · 2024 · vocadapt.com