Chain call style with if-else injection in Scala

10:09 PM Posted by Yuriy Polyulya , ,
If-else injection in functions chain call style design.

    To make functions call chain continuous a conditional operator like: if or if-else sometimes needed. As far as Scala is not pure functional language and some functions in chain can be changed according to some local conditions or variables. So a goal of if-else operator injection is to make chain continuous without temporal variables usage.    It is applicable for Immutable Objects where forming function call chain is natural by design.