concise

Making your Scala code more concise (and your intent more clear)

I was trying to write some code last night while I was very tired, and while the code itself isn't difficult in any way, the thought process I went through demonstrates how your code can become more concise as your understanding of Scala evolves, so I thought I'd share the experience here.

While working on my Sarah application, I was rewriting the Brain class, and I started off writing a method that looked like this:

Syndicate content