Let's say I want to construct a list with 10 elements where each elements can be 0 or 1 or 2. What I have are two lists List1 and List2, they are the positions of those 1 and 2. So how can I construct the whole list using a function like this:
construct(List1,List2,L).
example:
Input:
construct([1,3,5],[8],L)
Output:
L = [1,0,1,0,1,0,0,2,0,0]