How to find the Nth element of a list, and print said element out?

First of all, you have to understand that in Prolog, you don't manipulate return values of function. The reason behind this is that you do not manipulate functions, but predicates. So length(List) never evaluates to a number, but to true or false, as any other predicate.

When you write findelement(List, length(List), len... the findelement predicate won't be called with something like a, b, c and 3 it will be called with something like a, b, c and length(a, b, c) . So already your program cannot work.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions