How to create your own control structures in Scala
alvin
June 7, 2015 - 4:06pm
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 3.18, “How to create your own control structures in Scala.”
Problem
You want to define your own control structures to improve the Scala language, simplify your own code, or create a DSL for others to use.