Will be worth 20% of total score. The input string will be
generalized to include any number of nested lists (ie, lists of lists
of lists …). The smash function must be a deep recursive
function. The result should be a unique match (ie, typing a semicolon
to ask for alternatives should return none). Here is an example
query:
| ?- smash([a, [b], [[c]], [[[d, e], f]]], X).
X = [a,b,c,d,e,f] ? ;
no