问题
问答题
利用广义表的head和tail操作,可从广义表
L=((a,b),(c,d))
中分解得到原子c,其操作表达式为
head(head(tail(L)));
分别写出从下列广义表中分解得到b的操作表达式。
(1)L1=(a,b,c,d);
(2)L2=(((a),(b),(c),(d)))。
答案
参考答案:
解析:head(head(tail(head(L2))))
利用广义表的head和tail操作,可从广义表
L=((a,b),(c,d))
中分解得到原子c,其操作表达式为
head(head(tail(L)));
分别写出从下列广义表中分解得到b的操作表达式。
(1)L1=(a,b,c,d);
(2)L2=(((a),(b),(c),(d)))。
参考答案:
解析:head(head(tail(head(L2))))
完形填空 | ||||
One day, Tom was on his way home. When he passed a corner, he heard a weak(微弱lyj) cry. Tom stopped 1 and looked around. At last he found a little 2 . It was thin and dirty. Its cry sounded 3 .Tom went to it,“Come on! I'll take you 4 ” Tom's mother didn't like animals. She said to Tom, "You know, your father 5 dogs. We can't keep the dog with us. What about giving it to a person who likes dogs? Then it will 6 a home." Tom said, "OK! But can we keep it for some time 7 giving it to others?" His mother said, "Of course, but you must look after it yourself. " So every day after Tom got home from school, he gave the dog some 8 and then cleaned it. One month later,they were all surprised to 9 the dog was so white with long hair and it looked 10 ! Tom and his parents liked it very much,and they didn't want to give it to others. Now Tom's family lived a happy life with the dog. | ||||
|