summaryrefslogtreecommitdiffhomepage
path: root/examples/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/list.c')
-rw-r--r--examples/list.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/list.c b/examples/list.c
index 4fa76f81..694ec60b 100644
--- a/examples/list.c
+++ b/examples/list.c
@@ -5,7 +5,10 @@
declare_CList(ix, uint64_t);
int main() {
- CList_ix list = clist_init;
+ CList_ix list = clist_ix_from((uint64_t[]) {10, 20, 30, 40}, 4);
+ c_foreach (i, clist_ix, list) printf("%zu ", i.item->value);
+ puts("");
+
pcg32_random_t pcg = pcg32_seed(time(NULL), 0);
int n;
for (int i=0; i<10000000; ++i) // ten million