Difference Lists Flashcards
1
Q
write append/3 for ordinary lists
A
169
2
Q
What’s the time complexity of naive append? Explain why it performs copying.
A
171-172
3
Q
What is the Prolog syntax for
1 :: ( 2 :: ( 3 :: A ) )
A
173
4
Q
app/6 unsimplified version
A
174
5
Q
Derive app/6 simplified
A
175-184
6
Q
Explain the notation for difference lists
A
185-186
7
Q
How should you write an empty difference list?
A
187
8
Q
Explain the reason why empty diff lists are A-A by considering appending onto an empty list.
A
188