dirtydeeds
macro for partially applied calls
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Authors
- metagn
Installation
nimble install dirtydeeds
choosenim install dirtydeeds
git clone https://github.com/metagn/dirtydeeds
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| dirtydeeds | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.0.0 | No |
Source
| Repository | https://github.com/metagn/dirtydeeds |
|---|---|
| Homepage | https://github.com/metagn/dirtydeeds |
| Registry Source | nimble_official |
README
dirtydeeds
Quick and dirty partial application of calls with possible typed arguments.
import dirtydeeds, sequtils
assert @[1, 2, 3].map(deed _ * 7) == @[7, 14, 21]
assert @["A", "B", "C"].map(deed "foo" & (_: string)) == @["fooA", "fooB", "fooC"]
assert @['a', 'f', 'A', '0', 'c'].filter(deed contains({'a'..'z'}, _)) == @['a', 'f', 'c']
More uses in tests. Note that this is currently only for partial application,
things like _ + (_ - 1) will not work.