How to set default values for Scala method parameters
By Alvin Alexander. Last updated: August 7 2018
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 5.3, “How to set default values for Scala method parameters.”
Problem
You want to set default values for method parameters so the method can optionally be called without those parameters having to be assigned.