Another Golf friendly feature at work here is the apply method in Scala. It is defined on RichString as an alias for Java's String#charAt method. Given my Golf comment, it is unfortunate that the _ can't be used more in the above problem. Two of the closures needed to refer to the bound variable twice. If you use two _ then the compiler assumes the closure is taking two input parameters. Seems like you could infer the number of input parameters and allow more flexible use of _ ... which could make Scala even more expressive and even more confusing!