dom-top
dom-top copied to clipboard
Unorthodox control flow, for Clojurists with masochistic sensibilities.
trafficstars
Dom Top
Unorthodox control flow, for Clojurists with masochistic sensibilities. Available via clojars.
Tour
See dom-top.core for comprehensive documentation with examples.
assert+works likeassert, but returns truthy values being tested, and throws other types of exceptions (including maps, via ex-info!)bounded-futureis just likefuture, but for CPU-bound tasks.bounded-pmap, by contrast, puts a global limit on parallelism for CPU-bound tasks.disorderlyis adoblock that evaluates statements in a new, random order every time, instead of sequentially.fcatchlifts functions that throw exceptions into functions that return exceptions.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.real-pmapprovides a fully parallel version ofmap, which spawns one thread per element, instead of running on a limited threadpool.with-retryprovidesrecurthat works throughtry/catchblocks; particularly useful for retrying network operations.
Why would you WANT this?
Look, this is a judgement-free zone, OK? We all have our reasons.
License
Copyright © 2017, 2018 Kyle Kingsbury
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.