The function that reverses a list has the following representation in virtual code.
reverse
]] = ((nil,nil),(nil,(nil,nil)))
This function takes a list as an argument, and returns a the list consisting of the same items in the reverse order. The semantics is given by the following properties.
reverse
]] nil
= nil
reverse
]] (
x,
y)
= [[cat
]] ([[reverse
]] y,(
x,nil)
)