copyList([]) = [] copyList(h:t) = h:copyList(t)Converting to C++ yields the following.
List copyList(const List L)
{
if(isEmpty(L))
{
return emptyList;
}
else
{
return cons(head(L), copyList(tail(L)));
}
}