Refactor using recursion and concatenation
Refactor test using tuple, Enum and anonymous fn()