Do
Evaluates an expression repeatedly, for its side effects, and returns Nothing.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Do✓Do(body, n)Evaluates times, with no loop variable.Do(body, {i, imax})Evaluates with running .Do(body, {i, imin, imax})Evaluates with running .Do(body, {i, imin, imax, di})Evaluates with running up to (or down to, for ) .Typed signatures
| Type | Package | Applies |
|---|---|---|
(any, any) -> any | combinatorics | always |
Details
- Always returns — this library's stand-in for Wolfram's (see the entry in @enumeratio/wolfram's
SYMBOLSmap). - , when named, is a fresh local for the whole call, the same way Module's locals are — it does not leak, and does not clobber an outer binding of the same name.
- Bounds and step are integers only; Wolfram additionally allows real-valued iterators.
- The examples below place the call inside a alongside its surrounding statements — the it returns simply vanishes from that (compute-engine's own behavior for , matching Wolfram), which is why each result has one fewer entry than statements written.
Examples
Basic #
About
| Examples | 3 |
|---|---|
| Checked against | Wolfram Language 1 agree |
| Crosswalk | Wolfram Language |