It is as though there are different compilers for each method (Xcode, Xcode playground, and REPL)... It would be nice to understand why the code refuses to cooperate in playgrounds (on my Mac) but, it is good to know that if the code should work (logically) and it doesn't in Xcode, that a sanity check can be done from Terminal.