summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/prime.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/examples/prime.c')
-rw-r--r--misc/examples/prime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/examples/prime.c b/misc/examples/prime.c
index 41d637b8..f6e89e09 100644
--- a/misc/examples/prime.c
+++ b/misc/examples/prime.c
@@ -2,7 +2,9 @@
#include <math.h>
#include <time.h>
#include <stc/cbits.h>
-#include <stc/views.h>
+#include <stc/algo/filter.h>
+#include <stc/algo/crange.h>
+
cbits sieveOfEratosthenes(size_t n)
{
@@ -41,7 +43,7 @@ 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)
+ c_FORFILTER (i, crange, crange_LITERAL(n - 1, 0, -2)
, cbits_test(&primes, *i.ref>>1)
, c_FLT_TAKE(i, 50)) {
printf("%lld ", *i.ref);