Repository navigation
FP Mojo 1.0.2 moves the library to Mojo 1.2.0, adds a structured async runtime, and supports macOS arm64 throughout, the multi-threaded runtime included.
- Mojo 1.2.0. FP Mojo 1.0.2 requires Mojo 1.2.0; 1.0.0 and 1.0.1 remain the Mojo 1.1.0 releases.
- Async runtime, after Cats Effect.
IOwith fibers, structured concurrency, racing, resources andSupervisor. Programs run on a work-stealing pool by default, with per-worker timers, descriptor waits and a blocking hand-off; the current-thread profile remains available. The publicRuntime,ProfileandIORuntimeConfig;IO.blockingandIO.interruptible; execution contexts (eval_on,start_on,background); concurrent traversal; andTestControlvirtual time with seeded exploration and replay. - Pipelines and combinators.
pipeline(value)infers the container family, andraising[E]()selects native errors once. Fluentmap2,ap,map_nandproduct_n; effectful traversals, folds and predicates; parallel validation with error accumulation; shared error handling (recover,or_else,redeem,ensureand more) lifted through the monad transformers;NonEmptyList,Ior, and the environment, state and log capabilities. - Compact
Nodestorage. Each value of a recursive data type is one allocation holding a 32-bit atomic count, its height and only its own constructor, which the handle names, sofp.matchdispatches without reading memory. Dropping a tree allocates at most one work list. Building, traversing and releasing a 262,143-node tree takes 0.4-0.7x the time of hand-writtenArcPointercells. - macOS arm64. The whole library, including OS threads, the work-stealing pool and the blocking pool, runs on macOS. Pool and blocking threads get an 8 MiB stack there, as glibc usually gives on Linux.
Verified on Linux x86-64 and macOS arm64 (Apple M2 Max, macOS 26) with Mojo 1.2.0: every documentation example on both async profiles through source and package imports at O0 and O3; 1,109 suite programs and 2,888 compile-time rejections against the package; 6,048 native boundary checks. On macOS also the async runtime's qualification (1,184 checks on both profiles), a one-hour soak with flat memory, and the suite and rejections through source imports.
Install from the Modular community channel (available once modular/modular-community#443 is merged):
# pixi.toml
[workspace]
channels = ["https://conda.modular.com/max", "https://repo.prefix.dev/modular-community", "conda-forge"]pixi add fp_mojoDocumentation: https://spellbound-mojo.github.io/fp_mojo/