Created
February 15, 2021 10:04
-
-
Save nitrix/a3fac5788d273f17a9e1a998052bf711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main :- | |
natural(N), | |
N < 1000, | |
(multipleOf(3, N) ; multipleOf(5, N)), | |
converge(sum(N), Answer), | |
printLine(Answer). | |
------------------------- vs -------------------------- | |
solution(N) :- | |
natural(N), | |
N < 1000, | |
(multipleOf(3, N) ; multipleOf(5, N)). | |
main :- | |
aggregate(sum(N), solution(N), Answer), | |
printLine(Answer). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment