Execute a block after computing a result.
This crate provides the macro prog1
, an implementation of the homonymous
Common Lisp macro.
It allows to compute a result, before executing a block that changes values used to compute the result.
```
extern crate prog1;
fn main() { let mut a = 0;
assert_eq!(prog1!(a; { a += 1 }), 0);
assert_eq!(a, 1);
} ```
Copyright 2016 Philipp Matthias Schaefer philipp.matthias.schaefer@posteo.de
Licensed under the Apache License, Version 2.0