Projekte
Auf GitHub ansehen
aphyr/dom-top
Über uns
Unorthodox control flow, for Clojurists with masochistic sensibilities.
EntwicklerwerkzeugeGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalDom Top
Unorthodox control flow, for Clojurists with masochistic sensibilities.
Tour
See dom-top.core for comprehensive documentation with examples.
Iteration
with-retryprovidesrecurthat works throughtry/catchblocks; particularly useful for retrying network operations.letrprovides let bindings with early return; particular useful for aborting early on failure cases.looprexpresses reductions with multiple accumulators over multiple dimensions. It combines the nested iteration offor, the multiple accumulators/dimensions ofloop, and the concise iteration/accumulation structure ofreduce. Also, it's fast.reducerbuilds a reducing function for multiple accumulators, carrying state in a dynamically-compiled, primitive-aware, mutable accumulator datatype. For simple reductions it's about twice as fast as an idiomatic vector accumulator.
Concurrency
ex-promiseis a promise which can throw exceptions, likefuturedoes.bounded-futureis just likefuture, but for CPU-bound tasks.bounded-pmap, by contrast, puts a global limit on parallelism for CPU-bound tasks.real-pmapprovides a fully parallel version ofmap, which spawns one thread per element, instead of running on a limited threadpool.timeouttimes out IO-bound work.
Error Handling
assert+works likeassert, but returns truthy values being tested, and throws other types of exceptions (including maps, via ex-info!)fcatchlifts functions that throw exceptions into functions that return exceptions.
Other
disorderlyis adoblock that evaluates statements in a new, random order every time, instead of sequentially.
Why would you WANT this?
Look, this is a judgement-free zone, OK? We all have our reasons.
Thanks
Justin Conklin offered advice on ASM and wrote the core of dom-top's generator of mutable accumulators.
License
Copyright © 2017--2026 Kyle Kingsbury
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.
Ähnliche Projekte entdecken
Wird geladen…