Speaking only for myself, I think it's because of how I would do it in Java. Without the implicit conversion to `WrappedString` which Scala offers, Java makes it necessary to take the detour through a `StringBuilder`, so a "one-liner" would not be very readable. Plus the `==` operator is strictly for referential equality in Java.

But since Scala makes it possible to neatly write it as you suggest, I will edit the article accordingly.

If you spot any instances in the OEIS where it can be rewritten as you suggest, we should probably edit accordingly.

--

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store