Skip to content

funcool/promesa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f52f58c · May 22, 2025
Sep 28, 2022
May 11, 2025
May 21, 2023
May 22, 2025
May 11, 2025
May 11, 2025
May 22, 2025
May 13, 2025
Dec 5, 2023
Dec 5, 2023
May 11, 2025
May 22, 2025
Oct 15, 2022
May 11, 2025
May 22, 2025
May 11, 2025
Nov 13, 2022
May 10, 2025
May 11, 2025
May 21, 2023
Feb 22, 2022
May 10, 2025

Repository files navigation

promesa

Clojars Project

A promise library & concurrency toolkit for Clojure and ClojureScript.

This library exposes a bunch of useful syntactic abstractions that considerably simplify working with promises (in a very similar way as you will do it in JS with async/await) and many helpers from executors to concurrency patterns (bulkhead & CSP). With 0 runtime external dependencies.

Here you can look a detailed documentation.

Getting Started

deps.edn:

funcool/promesa {:mvn/version "11.0.678"}

Leiningen:

[funcool/promesa "11.0.678"]

On the REPL

(require '[promesa.core :as p])

(->> (p/promise 1)
     (p/map inc)
     (deref)
;; => 2

NOTE: example only work on JVM because the evident lack of blocking primitives on JS runtime.

Contributing

If you miss something, feel free to open an issue for a discussion. If there is a clear use case for the proposed enhancement, the PR will be more than welcome.

Testing

Run the Clojure (.clj) tests:

clojure -X:dev:test

Run the ClojureScript (.cljs) tests:

npm install
npm test