Created
December 23, 2018 05:55
-
-
Save DonaldKellett/2e031624f464914d88399379890d68d6 to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 6 - Exercise 6.5 - Swap first and last element
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
swapfl(List1, List2) :- append([A | M], [B], List1), append([B | M], [A], List2). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment