25 ms·
You could simply reverse the order of the arguments to cons.
by Miky 16y ago
You could simply reverse the order of the arguments to cons.
- blahedo 16y agoIt's more subtle than that, though. Every list has a beginning; not all lists have ends. If the 'car' semantics are "last item of the list" this is actually meaningfully different from "first item of the reversed list".
- Miky 16y agoIt's not meaningful at all. The list would just be constructed entirely from right to left. The "first" item in a pair would be on the right, and "car" would just mean "item on the right of a pair", or "first item in a list".
- blahedo 16y agoAre you also writing right-to-left, then? If everything about the system is reflected (including having a reading order of right-to-left), then you're right, it's not meaningful. But it's also not what's proposed in the OP here. When the two-dimensional text on the screen is re-formed into a linear string, it is the right end of line N that is attached to the left end of line N+1, and so the right-hand arguments of functions are "after" the left-hand arguments.