diff options
| author | Tyge Løvset <[email protected]> | 2022-09-27 09:51:52 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-09-27 09:51:52 +0200 |
| commit | 513300d52839e7e493bd296ba9786a018ce9dbd8 (patch) | |
| tree | a785a66e4ce149978d75fd8b3aab739e92537d00 /docs | |
| parent | 60c4432678073faa271fe9b6f632c5a3789d5727 (diff) | |
| download | STC-modified-513300d52839e7e493bd296ba9786a018ce9dbd8.tar.gz STC-modified-513300d52839e7e493bd296ba9786a018ce9dbd8.zip | |
Renamed c_flt_drop() and c_flt_dropwhile()
to c_flt_skip() and c_flt_skipwhile()
This lines up with Rust namings, and does not conflict with the use of drop as destructor.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ccommon_api.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 39200907..be23dc36 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -224,9 +224,9 @@ Iterate containers with stop-criteria and chained range filtering. | Built-in filter | Description | |:----------------------------------|:-------------------------------------| -| `c_flt_drop(it, numItems)` | Drop numItems | +| `c_flt_skip(it, numItems)` | Skip numItems | | `c_flt_take(it, numItems)` | Take numItems | -| `c_flt_dropwhile(it, predicate)` | Drop items until predicate is false | +| `c_flt_skipwhile(it, predicate)` | Skip items until predicate is false | | `c_flt_takewhile(it, predicate)` | Take items until predicate is false | `it.index` holds the index of the source item, and `it.count` the current number of items taken. @@ -248,7 +248,7 @@ int main() { c_forfilter (i, IVec, vec, isOdd(*i.ref) - && c_flt_drop(i, 100) // built-in + && c_flt_skip(i, 100) // built-in && isPrime(*i.ref) , c_flt_take(i, 10)) { // breaks loop on false. printf(" %d", *i.ref); |
