Created
December 22, 2018 16:40
-
-
Save DonaldKellett/fd9c000896d73d186f8c6ddca46f53f5 to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 5 - Exercise 5.3 - Increment each element in the list
This file contains hidden or 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
addone([], []). | |
addone([X | L0], [Y | L1]) :- Y is X + 1, addone(L0, L1). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment