I was working with String.all to determine if my String would have capitals only:
String.all Char.isUpper "ABC" == True
However at some point I had an empty String in this statement.
The result was the same, also True!
String.all Char.isUpper "" == True
- So I could say: The String
"ABC"both equally qualify as String with only capitals in it.
- Or I could say: The String
"abc"both equally qualify as String with only alphabetical characters in it.
That seems a little off to me. Maybe there is a reason behind this ( I didn’t expect that coming…) ?
I also wonder why the documentation does not say anything about this. I took a little time to think about this and a little story came to my mind:
Every evening some people with weird white hats and long hair would stay in front of my rooms door at 6 pm. I heard them talking and so I opened the door. Then I always asked them: ‘Do you all wear white hats ?’. And they replied: ‘Yes, we do’ !
Some weeks later, at some rainy autumn day, it was quiet at 6pm, no talkings. I went to my door, opened it, and to my surprise, nobody was there. I asked ‘Do you all wear white hats ?’ , and they replied: ‘Yes, we do !’.