mapping values

PaulS:

I am thinking about smthing like this:

You might think about something that actually compiles, instead. == instead of = in some places, too.

my question is do you understand what i need to do ?
and if it is, may you verify the code i wrote and suggest improvements ?