I got this assignment with Prolog lists and I need some help.
Build a program in Prolog that
- Check if a list is empty
- Check if a list is not empty
- Check if a list only has one element
- Check if a list has 2 or more elements
- Get the first element from a list
- Get the second element from a list
- Get a list without the first element (tail)
- Add an element to the head of the list