summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/list.c b/examples/list.c
index 2d672cf3..fd923719 100644
--- a/examples/list.c
+++ b/examples/list.c
@@ -10,7 +10,7 @@ int main() {
int k;
const int n = 2000000;
- c_auto (clist_fx, list)
+ c_auto (clist_fx, list)
{
stc64_t rng = stc64_init(1234);
stc64_uniformf_t dist = stc64_uniformf_init(100.0f, n);
@@ -37,6 +37,8 @@ int main() {
clist_fx_clear(&list);
c_apply(v, clist_fx_push_back(&list, v), int, {10, 20, 30, 40, 30, 50});
+ const double* v = clist_fx_get(&list, 30);
+ printf("found: %f\n", *v);
c_foreach (i, clist_fx, list) printf(" %g", *i.ref);
puts("");