reset password
Author Message
rabbott
Posts: 1649
Posted 22:44 Oct 21, 2016 |

Given two integers, a and b, and their string representations (say to base 10), aString and bString, it is not always that case that

a < b if and only if aString < bString (under the usual lexicographic ordering)

For example:

Prelude> 5 < 10
True

But:

Prelude> "10" < "5"
True

There is a condition under which it is always the case that a < b if and only if aString < bString.

What is the condition? And why is it relevant to project 6?

Last edited by rabbott at 10:25 Oct 22, 2016.