Idea: partially pure functions

Janice Caron caron800 at googlemail.com
Tue Apr 29 23:48:49 PDT 2008


2008/4/30 Bruno Medeiros <brunodomedeiros+spam at com.gmail>:
>  Example: consider a pure function that takes two strings as arguments,
> concatenates them, tolower's the first half, and toupper's the second half.

Not that this in any way changes your argument, but I take it you do
realise that toupper and tolower cannot be done in place, because the
UTF-8 sequences representing dchar c might be a different length from
the UTF-8 sequences representing toupper(c) or tolower(c).

This is a common misconception popular among people who only use ASCII. :-)



More information about the Digitalmars-d mailing list