To "fold x and y together" is to put both x and y into the same category. In other words, you treat both of them as equals. In more rigorous terms (for your CS stuff):
if x = b, and y = b, then x must = y
To actually answer your question, though, folding things together does NOT mean to convert them all into the same object. It just means to treat that as equals - members of a single group, in which all items are equal.
HOWEVER, what I said above is about the language meaning. In computer science, the implementation for this could be converting all of the objects to be equal (in this case, calling .upper()
or .lower()
on all of the input strings, or however you fix all of the characters to be of the same case). This likely isn't the way it is implemented, because it isn't very efficient to start mutating all of these strings (nor is it possible in many languages...you have to create new objects), but it certainly is a possible implementation. So yes, both are possible options in the world of computer science.
(As a sidenote, you've picked a great book to read! Kernighan is great - I met him once, and he's really very nice.)