Skip to content

Instantly share code, notes, and snippets.

@DonaldKellett
Created December 23, 2018 05:34
Show Gist options
  • Save DonaldKellett/4214f0c398ca8758c53c3306eb30970d to your computer and use it in GitHub Desktop.
Save DonaldKellett/4214f0c398ca8758c53c3306eb30970d to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 6 - Exercise 6.3 - Remove first and last element
toptail([_ | T], OutList) :- append(OutList, [_], T).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment