
"Chaddaï Fouché"
so you need an f so that c `f` x is c (for any c and x) and yet (b `f` c) is c for any c and b -- this is impossible (or I'm asleep).
Well, it isn't "impossible" but quite hard (and not even standard H98 if I'm not mistaken)
If it is possible, I'm very sad that we've allowed things to get into the language that make that kind of reasoning faulty.
Still you could "approximate" it, and in fact I believe the [Char] -> Char requirement is hinting at such a (arguably and IMO ugly) solution. For example you could assume there would be no "NUL" character in a string ([Char] is a synonym for String, or vice-versa), and then get a simple myLast for String in this restrictive case (and looking exactly like Alexteslin sample).
I certainly wouldn't count such a thing as a valid solution. It's always amazed me that C uses as standard a mechanism of ending strings that is so obviously an error-prone hack. -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk