You can accomplish that using ugly amounts of case...
# general
f
You can accomplish that using ugly amounts of case statements as demonstrated in the below PoC: