Link to home
Start Free TrialLog in
Avatar of Rowdyone52
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
Avatar of Juan Ocasio
Juan Ocasio
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial