Use two pure helpers in one expression.

Helper Composition

HelperComposition.scala
object Main {
  def double(value: Int): Int = {
    value * 2
  }

  def addOne(value: Int): Int = {
    value + 1
  }

  def main(args: Array[String]): Unit = {
    val start = 
    val result = addOne(double(start))

    println("start=" + start)
    println("result=" + result)
  }
}
object Main {
  def double(value: Int): Int = {
    value * 2
  }

  def addOne(value: Int): Int = {
    value + 1
  }

  def main(args: Array[String]): Unit = {
    val start = 
    val result = addOne(double(start))

    println("start=" + start)
    println("result=" + result)
  }
}
object Main {
  def double(value: Int): Int = {
    value * 2
  }

  def addOne(value: Int): Int = {
    value + 1
  }

  def main(args: Array[String]): Unit = {
    val start = 
    val result = addOne(double(start))

    println("start=" + start)
    println("result=" + result)
  }
}
helper-composition Small pure helpers can be composed by passing one helper's result into the next.