Skip to content

Instantly share code, notes, and snippets.

@DonaldKellett
Created December 22, 2018 10:02
Show Gist options
  • Save DonaldKellett/591b9c4a814812831b52c6d3c6cc54ce to your computer and use it in GitHub Desktop.
Save DonaldKellett/591b9c4a814812831b52c6d3c6cc54ce to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 4 - Exercise 4.6 - Repeat Twice
twice([], []).
twice([X | L1], [X, X | L2]) :- twice(L1, L2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment