Skip to content

Instantly share code, notes, and snippets.

@DonaldKellett
Created December 22, 2018 16:33
Show Gist options
  • Save DonaldKellett/da31a44102e2c51102776014f6e87867 to your computer and use it in GitHub Desktop.
Save DonaldKellett/da31a44102e2c51102776014f6e87867 to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 5 - Exercise 5.2 - Increment and Sum
increment(X, Y) :- Y is X + 1.
sum(X, Y, Z) :- Z is X + Y.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment