What's the more idiomatic way to write the following?
val starting_value = ...
val result1 = f1(startingValue)
val result2 = f2(result1)
...
val resultN = fN(resultN-1)
If starting_value
were a list of items to which I wanted to apply these functions, I could write
starting_list.map(f1).map(f2)...map(fN)
I can fake this by doing something like
Some(starting_value).map(f1)....map(fN).get
or
List(starting_value).map(f1)....map(fN).head
but this seems unnecessarily confusing.
Note: This question seems related but seems to be about a downstream issue.