diff options
| author | Tyge Løvset <[email protected]> | 2023-02-13 18:52:20 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-02-13 18:52:20 +0100 |
| commit | 98f126a304f296dea2517d9e81c7f8e7b3aa80f5 (patch) | |
| tree | 549330c3e0598fed528f50eb1c33b7fb7474ce72 /docs | |
| parent | a3645620cf4b8855801d9ca0cf7385de5a70c5d9 (diff) | |
| download | STC-modified-98f126a304f296dea2517d9e81c7f8e7b3aa80f5.tar.gz STC-modified-98f126a304f296dea2517d9e81c7f8e7b3aa80f5.zip | |
Changed name of c_flt_inc() to c_flt_count().
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 4553ada0..20517630 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -229,12 +229,12 @@ Iterate containers with stop-criteria and chained range filtering. | Built-in filter | Description | |:----------------------------------|:-------------------------------------| -| `c_flt_skip(it, numItems)` | Skip numItems | -| `c_flt_take(it, numItems)` | Take numItems | +| `c_flt_skip(it, numItems)` | Skip numItems (inc count) | +| `c_flt_take(it, numItems)` | Take numItems (inc count) | | `c_flt_skipwhile(it, predicate)` | Skip items until predicate is false | | `c_flt_takewhile(it, predicate)` | Take items until predicate is false | -| `c_flt_last(it)` | Get count of last filter successes | -| `c_flt_inc(it)` | Increment and return on the stack | +| `c_flt_count(it)` | Increment current and return value | +| `c_flt_last(it)` | Get value of last count/skip/take | `it.index` holds the index of the source item. ```c @@ -254,8 +254,7 @@ int main() { c_forfilter (i, crange, R, isPrime(*i.ref) - && (c_flt_skip(i, INT32_MAX) || - c_flt_last(i) % 25 == 0) + && c_flt_count(i) % 25 == 0 , c_flt_take(i, 10)) // breaks loop on false. { printf(" %d", *i.ref); |
