Open mrqorib opened 4 years ago
Answer: lists are just series of pairs such that list(e1, e2, e3)
is represented by pair(e1, pair(e2, pair(e3, null)))
. Pairs are internally represented with arrays of size 2. Thus, the textual representation of the above list is [e1, [e2, [e3, null]]]
.
Question: Lists and arrays seem to be quite similar, so I'd like to ask -- what are the differences? When do you use one over the other? Piazza: https://piazza.com/class/kas136yscf8605?cid=551