This website requires JavaScript.
Explore
Help
Sign In
patrick
/
anthem
Watch
1
Star
0
Fork
You've already forked anthem
0
Code
Issues
15
Releases
21
Activity
c1e75afb71
anthem
/
examples
/
prime.lp
5 lines
96 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add example program for prime number detection
2018-04-11 21:42:08 +02:00
composite(I * J) :- I = 2..n, J = 2..n.
prime(N) :- N = 2..n, not composite(N).
Update examples This updates the examples to showcase the scope of anthem’s feature set. New examples are added concerning placeholders, hiding predicates, and simplifications related to integer variables.
2018-04-22 22:26:17 +02:00
#show prime/1.