Skip to content

Instantly share code, notes, and snippets.

@fffprograming
Created October 18, 2013 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fffprograming/7035686 to your computer and use it in GitHub Desktop.
Save fffprograming/7035686 to your computer and use it in GitHub Desktop.
wa(N,Sum) :- M is N -1, wa(M,Sum2), Sum is Sum2 + N.
wa(0,0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment