Rowdyone52
asked on
Prolog - Systematically return last element in a list.
Im trying to figure out how to write a function to return the last element of a list in prolog. I can drop elements off of a list, but without knowing the size how can I determine the last element?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
check out this:
http://en.wikibooks.org/wiki/Programming:Prolog_Lists
jocasio