summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/prime.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-01-25 20:18:02 +0100
committerTyge Løvset <[email protected]>2023-01-25 20:18:02 +0100
commit68fd366ceaa919293d348ce15c2596d485160cec (patch)
treee50caaf6dc2952da36b5cd0c60252f94ee2b77ec /misc/examples/prime.c
parentaf4c2d6d2f3353364632701ef8208a9dcbe18623 (diff)
downloadSTC-modified-68fd366ceaa919293d348ce15c2596d485160cec.tar.gz
STC-modified-68fd366ceaa919293d348ce15c2596d485160cec.zip
Updates on cspan ++.
Diffstat (limited to 'misc/examples/prime.c')
-rw-r--r--misc/examples/prime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/examples/prime.c b/misc/examples/prime.c
index 4a6b0f68..5c8d65d3 100644
--- a/misc/examples/prime.c
+++ b/misc/examples/prime.c
@@ -43,7 +43,8 @@ int main(void)
puts("");
puts("Show the last 50 primes using a temporary crange generator:");
- c_FORFILTER (i, crange, crange_literal(n - 1, 0, -2)
+ crange R = crange_make(n - 1, 0, -2);
+ c_FORFILTER (i, crange, R
, cbits_test(&primes, *i.ref>>1)
, c_flt_take(i, 50)) {
printf("%lld ", *i.ref);