Formatted switch statement in function unpacksty