Skip to content

Instantly share code, notes, and snippets.

@DonaldKellett
Created December 22, 2018 09:42
Show Gist options
  • Save DonaldKellett/6b10bcea74d94f13d10b7d2ae28a8a04 to your computer and use it in GitHub Desktop.
Save DonaldKellett/6b10bcea74d94f13d10b7d2ae28a8a04 to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 4 - Exercise 4.4 - Swap first 2 elements of a list
swap12([X, Y | T], [Y, X | T]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment