Of course you can. You could also try it out yourself and verify that it works with a few test cases and some debug print statements to the serial monitor.
I'll do it.
How? The map() function demands that the first argument should be the variable that you want to map.
They just mean the value of toHigh is in a variable, not hardcoded into the map.
map (a, 1,1000, 25, x ) ?