scalapuzzlers / scalapuzzlers.github.com

Github Pages behind scalapuzzlers.com
www.scalapuzzlers.com
161 stars 53 forks source link

First draft of a string split puzzler #122

Closed demobox closed 9 years ago

demobox commented 9 years ago

Motivated by https://twitter.com/extempore2/status/543851869265596416

demobox commented 9 years ago

@nermin: I know you weren't a great fan of this in the form that's in the Tweet that gave rise to this.

Here, I've tried to use a method that exists only in Scala, making this a little similar to '$!.*% Iterators!' in the sense that it's weirdness you observe in Scala that is based on underlying Java behaviour.

demobox commented 9 years ago

@nermin: Ping..?

nermin commented 9 years ago

This would definitely not be the first puzzler caused by inherent Java behavior (I believe we have at least a couple), so from that perspective it's a fair game. I still don't find much to learn from this one, but I am also not opposed to publishing it. You did a nice job @demobox of creating a better puzzler from the original tweet.

demobox commented 9 years ago

I still don't find much to learn from this one

Agreed - string splitting is probably quite a common operation, but this is not something you're likely to run into all that often. Thanks for the review, @nermin!

demobox commented 9 years ago

Merged to master: ca32f51