Question: Further Operations on Cartesian Lists. We refer to Example 4.2 on page 67. Define the following operations on Cartesian lists: (L = A*) (token, token)
Further Operations on Cartesian Lists. We refer to Example 4.2 on page 67. Define the following operations on Cartesian lists:(L = A*)
(token, token) ???
((a), token) ??a?
((a), ((b), token)) ??a,b?
((a), ((b), ((c), token))) ??a,b,c?
1. len : The length of a list: The number of ( zero, one or more) elements that it contains .
2. ind s : The index set of a list: The set of indices, from 1 to and including the length of the list. If the list is empty then the index set is the empty set.
3. elem s : The element set of a list: The set of distinct elements of the list. If the list is empty then the element set is the empty set.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
